Using integer variables : addition

, by Prashant Gunjal


Integer Addition


 #include<stdio.h>
 void main()
 {
int no1,no2,res;
clrscr();
printf("\n\t Enter no 1:");
scanf("%d",&no1);
printf("\n\t Enter no 2:");
scanf("%d",&no2);
res = no1 + no2;
printf("\n\tResultant addition =  %d",res);
  getch();
}

Output :

0 comments: