Senin, 14 Maret 2016

KASUS 2.6

hasil kodingan 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 m,n,r;
    float q;
    cout<<"masukkan nilai M =";cin>>m;
    cout<<"masukkan nilai N =";cin>>n;
    q=m/n;
    r=m%n;
    cout<<"hasil q ="<<q<<endl;
    cout<<"hasil r ="<<n;
    return 0;
}

output c++:


hasil output raptor:



0 komentar:

Posting Komentar