Skip to content

Instantly share code, notes, and snippets.

@IhwanID
Created December 22, 2018 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IhwanID/e967acf4da6ad8b5fea2b55625d3433c to your computer and use it in GitHub Desktop.
Save IhwanID/e967acf4da6ad8b5fea2b55625d3433c to your computer and use it in GitHub Desktop.
If Else Pilih Jurusan dengan Bahasa C - STMIK Sumedang
#include <stdio.h>
int
main ()
{
int nomor_jurusan;
printf ("Masukkan Nomor Jurusan yang dipilih (1-3) : ");
scanf ("%d", &nomor_jurusan);
if (nomor_jurusan == 1)
{
printf ("Anda Memilih Jurusan MI/D3 \n");
}
else if (nomor_jurusan == 2)
{
printf ("Anda Memilih Jurusan TI/S1 \n");
}
else if (nomor_jurusan == 3)
{
printf ("Anda Memilih Jurusan SI/S1 \n");
}
else
{
printf ("Salah Memasukan Pilihan \n");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment