The programmer blog

This is my personal blog. Im a programmer.i would like to share programs as well as my personal memories through this blog... dedicted to all my friends

Monday, January 26, 2009

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:

0 Comments:

Post a Comment

<< Home

Spread Firefox Affiliate Button