Breaking News
Loading...
Selasa, 15 Maret 2016

Tugas Analisa 2.6

Menghitung Perbandingan n dan m dengan C++ dan Raptor :


Dev 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;
 float q,r;
 cout<<"Masukkan nilai M = ";cin>>m;
 cout<<"Masukkan nilai N = ";cin>>n;
 q =m/(float)n;
 r = m%n;
 cout<<"\nNilai q = "<<q;
 cout<<"\nNilai r = "<<r;
 return 0;
}


Setelah di kompile hasilnya :

Raptornya :



0 komentar:

Posting Komentar

Copyright © 2014 My Blog My Adventure All Right Reserved