Have a Read!

Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!

Tuesday, January 25, 2011

C PROGRAM FOR BASIC ADDITION

#include<stdio.h>

int main() {

int x,y,sum;

printf("PLEASE ENTER NUMBERS:\n");

scanf("%d %d",&x,&y);

sum=x+y;

printf("THE SUM OF NUMBERS ENTERED IS %d\n",sum);

return 0;
}

No comments:

Post a Comment

Related Posts with Thumbnails