Program c If Else

#include<stdio.h>
main()
{
int n;
printf(“masukkan nilai anda \n”);
scanf(“%i”,&n);
if(n>=80 && n < 100)
printf(“kategori A \n”);
else
if(n>=70 && n <= 79)
printf(“kategori B \n”);
else
if(n>=60 && n <= 69)
printf(“kategori C \n”);
else
if(n>=50 && n <= 59)
printf(“kategori D \n”);
else
printf(“kategori E \n”);
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: