Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to add two numbers with using function?

Answer Posted / sathish kumar .k

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,i;
int sum=0;
clrscr();
printf("Enter Two Nos");
scanf("%d%d",&a,&b);
for(i=0;i<a;i++)
sum=sum+1;
for(i=0;i<b;i++)
sum=sum+1;
printf("Sum:%d",sum);
getch();
}

Is This Answer Correct ?    18 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Place the #include statement must be written in the program?

1045


What is a #include preprocessor?

1163


What is the size of empty structure in c?

1086


What is call by value in c?

1010


Is there a way to jump out of a function or functions?

1107


Why shouldn’t I start variable names with underscores?

1067


while initialization of array why we use a[][2] why not a[2][]...?

2367


Write a program to show the change in position of a cursor using c

1075


What is a program flowchart and explain how does it help in writing a program?

1314


Is array a primitive data type in c?

1078


What is this infamous null pointer, anyway?

1064


What does s c mean in text?

1098


Explain what is the difference between #include and #include 'file' ?

1034


What is ponter?

1271


Give me the code of in-order recursive and non-recursive.

1378