INTRODUCTION TO C ...A BASIC C PROGAM
/*---------- program begins here-----------------*/
/*A SIMPLE PROGRAM TO ADD TWO NUMBERS*/
/* program by:GAGZ */
void main()
{
int x,y,sum;
clrscr();
printf("\n enter 2 numbers:");
scanf("%d%d",&x,&y);
sum=x+y;
printf("\n the sum of two numbers is %d",sum);
getch();
}
/*------ *program ends here*--------*/
this program just adds 2 integer numbers and dispays the sum, very simple rite???.. the aim of showing this program here is for reminding the readers who r out of touch with c programming..more programs will be updated .
Labels: cprograms
0 Comments:
Post a Comment
<< Home