# include <<iostream.h>>
# include <<conio.h>>
main()
{
int a=20,b=10,add1,sub1,multiply1,div1;
float x=30.25,y=25.30,add2,sub2,multiply2,div2;
clrscr();
cout <<"\n**************************";
cout <<"\n* OPERATOR of ARITMATHIC *";
cout <<"\n**************************";
cout <<"\n\n";
cout <<"\n a = "<<a <<", b = "<<b;
cout <<"\n x = "<<x <<", y = "<<y;
cout <<"\n";
cout <<"\n Adding...";
cout <<"\n===========";
add1 = a + b;
add2 = x + y;cout <<"\n a + b = " <<add1;
cout <<"\n x + y = " <<add2;
cout <<"\n Subtracting...";
cout <<"\n================";
sub1 = a - b;
sub2 = x - y;cout <<"\n a - b = " <<sub1;
cout <<"\n x - y = " <<sub2;
cout <<"\n Multiplying...";
cout <<"\n================";
multiply1 = a * b;
multiply2 = x * y;cout <<"\n a * b = " <<multiply1;
cout <<"\n x * y = " <<multiply2;
cout <<"\n Divide...";
cout <<"\n===========";
div1 = a / b;
div2 = x / y;cout <<"\n a / b = " <<div1;
cout <<"\n x / y = " <<div2;
getch();
}
Search
Categories
- Part I : Perkenalan (4)
- Part II : Operator (3)
- Part III : Percabangan (materi) (2)
- Part III : Percabangan (program) (4)
- Part IV : Perulangan (meteri) (3)
- Part IV : Perulangan (program) (3)
- Part V : Array (materi) (1)
- Part V : Array (program) (2)
- Penerapan (6)
- Pointer (2)
- Searching (pencarian) (3)
- Typedef (1)