Completely Solved C, C++ Programs Assignment.




C Program To Read Two Numbers And Print

Filed Under:

Problem 2: C Program To Read Two Numbers And Print The Sum Of Given Two Numbers.
#include<stdio.h>
#include<conio.h>
main()
{
int a,b, sum;
clrscr ();
printf (“ENTER VALUE FOR A ;
“);
scanf (“%d”,&a);
printf(“ENTER VALUE FOR B
;”);
scanf(“%d”,&b);
sum=a+b;
printf(“Sum Of Given Two
Numbers are %d”, sum);
getch();
}

C compiler: gcc 4.1.2

 Back to main directory: Sample C Program | Software Practical | Solved C Assignment


Get Free Programming Tutorials and Solved assignments