Modul 5.3
http://www.youtube.com/watch?v=qa0DnzVgoFs
Listing Program
//Project 5-3 : Percabangan IF bersarang
//Nama : Wulan Kandiani Kusumah Wardani
//NRP : 49013036
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
double Nilai_Ujian;
char Indeks;
std::cout << "Konversi NILAI SISWA \n\n";
std::cout << "Masukan Nilai Ujian : ";
std::cin >> Nilai_Ujian;
std::cout << endl;
if(Nilai_Ujian >= 85)
{
Indeks ='A';
}
else
if(Nilai_Ujian >= 75)
{
Indeks = 'B';
}
else
if(Nilai_Ujian >= 55)
{
Indeks = 'C';
}
else
if(Nilai_Ujian >= 40)
{
Indeks = 'D';
}
else
{
Indeks = 'E';
}
std::cout<< "Indeks Siswa= "<< Indeks <<endl;
system("pause");
return 0;
}
http://www.youtube.com/watch?v=qa0DnzVgoFs
Listing Program
//Project 5-3 : Percabangan IF bersarang
//Nama : Wulan Kandiani Kusumah Wardani
//NRP : 49013036
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
double Nilai_Ujian;
char Indeks;
std::cout << "Konversi NILAI SISWA \n\n";
std::cout << "Masukan Nilai Ujian : ";
std::cin >> Nilai_Ujian;
std::cout << endl;
if(Nilai_Ujian >= 85)
{
Indeks ='A';
}
else
if(Nilai_Ujian >= 75)
{
Indeks = 'B';
}
else
if(Nilai_Ujian >= 55)
{
Indeks = 'C';
}
else
if(Nilai_Ujian >= 40)
{
Indeks = 'D';
}
else
{
Indeks = 'E';
}
std::cout<< "Indeks Siswa= "<< Indeks <<endl;
system("pause");
return 0;
}
Tidak ada komentar:
Posting Komentar