Program menggunakan operator aritmatika dengan Dev C++
Program menggunakan operator aritmatika dengan Dev C++ :
#include <iostream>
using namespace std;
int main()
{
int a, b;
a = 100;
b = 30;
cout<<"penggunaan operator aritmatika\n";
cout<<"www.ibmb.ac.id\n\n";
cout<<"nilai a=100\n";
cout<<"nilai b=30\n\n";
cout<<"a+b = "<<a+b<<endl;
cout<<"a-b = "<<a-b<<endl;
cout<<"a*b = "<<a*b<<endl;
cout<<"a/b = "<<a/b<<endl;
cout<<"a%b = "<<a+b<<endl;
cout<<"a++ = "<<a++<<endl;
cout<<"a-- = "<<a--<<endl;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int a, b;
a = 100;
b = 30;
cout<<"penggunaan operator aritmatika\n";
cout<<"www.ibmb.ac.id\n\n";
cout<<"nilai a=100\n";
cout<<"nilai b=30\n\n";
cout<<"a+b = "<<a+b<<endl;
cout<<"a-b = "<<a-b<<endl;
cout<<"a*b = "<<a*b<<endl;
cout<<"a/b = "<<a/b<<endl;
cout<<"a%b = "<<a+b<<endl;
cout<<"a++ = "<<a++<<endl;
cout<<"a-- = "<<a--<<endl;
return 0;
}
Komentar
Posting Komentar