Thursday, 15 December 2011

operator or


#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int nilai,tugas,total;
float rata;
printf("Masukkan Nilai                 = ");scanf("%i",&nilai);
printf("Masukkan Nilai Tugas           = ");scanf("%i",&tugas);
printf("\n\n''+,,+''+,,+''+,,+''+,,+''+,,+''\n");
if (nilai>70 || tugas >=75)
{printf("\n    Selamat, Anda Lulus\n");
printf("\n''+,,+''+,,+''+,,+''+,,+''+,,+''\n\n\n");}
else
{printf("\n    Mohon Maaf, Anda Tidak Lulus\n");}
total=nilai+tugas;
rata=total/2;
printf("Total Nilai Anda Adalah         = %i\n",total);
printf("Dan Nilai Rata-Rata Anda Adalah = %.2f\n",rata);
getch();
}

No comments:

Post a Comment