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

What is const keyword in c?

1219


What is pass by value in c?

1134


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1228


What's the best way of making my program efficient?

1153


How can I get the current date or time of day in a c program?

1269


Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.

3214


Tell me when would you use a pointer to a function?

1124


What is an lvalue?

1107


What is the correct declaration of main?

1265


Hai what is the different types of versions and their differences

1978


Why is c platform dependent?

1139


Can the “if” function be used in comparing strings?

1108


Describe the difference between = and == symbols in c programming?

1455


What is the difference between typedef and #define?

1113


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

2243