Dibaca sebuah nilai angka mahasiswa tentukan nilai hurufnya, bila aturannya A: 80-100, B: 65-79, C : 55-64, D: 30-54, E : 0-29

Program C++

#include <iostream>

using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int nilai;
cout<<"masukkan nilai =";cin>>nilai;
if(nilai>=95)
cout<<"a";
else if(nilai>65)
    cout<<"b";
else if(nilai>55)
    cout<<"c";
else if(nilai>30)
    cout<<"d";
else
cout<<"e";
return 0;
}



Logikanya Menggunakan Raptor ComingSon

Share this:

ABOUT THE AUTHOR

Ceyron Louis

A web designer from India. And then you write some more information about yourself like this to fill out the space that is left.

0 komentar:

Posting Komentar