Tugas alogaritma 2
Raihan ramadhan 3420210009 Teknik informatika 2.1 #include <stdio.h> #include <conio.h> #include <iostream.h> //Nama : Raihan Ramadhan //NIM : 3420210009 //Prodi : Teknik Informatika void main() { int x,y; int a,b,c,d; clrscr(); cout<<"Masukan Nilai A: "; cin>>x; cout<<"Masukan Nilai B: "; scanf("%d",&y); /*Left Value Operator Right Value*/ /*=========================================================*/ a = x+y; c = x%y; b = x-y; d = x*y; /*=========================================================*/ cout<<endl<<endl; printf("Hasil dari A = X+Y= %i \n",a); printf("Hasil dari B = X-Y= %i \n",b); cout<<"Hasil dari C = X%Y= "<<c<<endl; cout<<"Hasil dari D = X*Y= "<<d<<endl; getch(); } 2.2