#include <iostream.h>
#include <conio.h>
#include <stdio.h>
void nilai ()
{
int nilai;
char nama[100];
cout << " PROGRAM UNTUK MENGETAHUI NILAI MAHASISWA " <<endl;
cout << " ================================================== " <<endl;
cout << " " <<endl;
cout << " " <<endl;
cout << "Masukan nama anda : ";
gets(nama);
cout << "masukan nilai (dalam angka) : ";
cin >>nilai;
cout << " " <<endl;
cout << "====================================================" <<endl;
cout << " " <<endl;
if (nilai>=80)
{
cout << "Nama Mahasiswa :" <<nama <<endl;
cout << "Nilai anda : A";
}
else if (nilai>=60)
{
cout << "Nama Mahasiswa : "<<nama <<endl;
cout << "Nilai anda : B";
}
else if (nilai>=40)
{
cout << "Nama Mahasiswa : "<<nama <<endl;
cout << "Nilai anda : C";
}
else
{
cout << "Nama Mahasiswa : "<<nama <<endl;
cout << "Nilai anda : D";
}
cout << " " <<endl;
cout << " ************ TINGKATKAN PRESTASIMU :) ************* " <<endl;
getch();
}
void main ()
{
nilai ();
nilai();
getch ();
}
18/03/12
C++ NILAI MAHASISWA
Label:
pemrograman
Diposting oleh
from indonesian computer to world
at
3/18/2012 06:34:00 PM
0 komentar
Posting Komentar