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

Does c have function or method?

993


What are identifiers in c?

1199


What are the complete rules for header file searching?

1074


What is the symbol indicated the c-preprocessor?

1240


Explain what is wrong in this statement?

1118


How do I get an accurate error status return from system on ms-dos?

1117


What is the difference between if else and switchstatement

1927


Here is a good puzzle: how do you write a program which produces its own source code as output?

1094


Where we use clrscr in c?

1131


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

1988


What does sizeof function do?

1190


What is null in c?

1087


Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

2055


write a c program to find the sum of five entered numbers using an array named number

2137


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1192