# include <conio.h>
# include <iostream.h>
# include <stdio.h>
main()
{
char nama[20],*hadiah;
int nil1,nil2,nil3;
float rt2;
cout<
cout<<” ============================================”<
cout<<” Program Hitung Nilai
Rata-Rata Siswa”<
cout<<”
============================================”<<
cout<<” Nama
Siswa :
“;gets(nama);
cout<<” Nilai Pertandingan I :
“;cin>>nil1;
cout<<” Nilai Pertandingan II : “;cin>>nil2;
cout<<” Nilai Pertandingan III : “;cin>>nil3;
if(nil1>=85)
{
hadiah=”Komputer P4″;
}
else if(nil2>=70)
{
hadiah=”Uang Tunai Rp.500,000″;
}
else
{
hadiah=”Hiburan lain”;
}
rt2=nil1+nil2+nil3/3;
cout<
cout<<” Siswa Yang Bernama : “<<
cout<<” Nilai Rata-rata :
“<<
cout<<” Hadiah Yang di Dapat : “<<
getch();