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...

write a 'c' program to sum the number of integer values

Answer Posted / arunkumar

#include<stdio.h>
#include<conio.h>

fun(int n);
int main()
{
int n=10;
printf("%d",fun(10));
}
fun(int n)
{
if(n<1)
return n;
else
return (n+fun(n-1));
}

Is This Answer Correct ?    5 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is file in c preprocessor?

1091


Is there any data type in c with variable size?

1036


int i=10; printf("%d %d %d", i, i=20, i);

1550


What is the significance of c program algorithms?

1100


Is there any possibility to create customized header file with c programming language?

1009


Can we compile a program without main() function?

1080


write a program to create a sparse matrix using dynamic memory allocation.

4844


What is the difference between variable declaration and variable definition in c?

1017


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.

2013


Difference between Shallow copy and Deep copy?

1971


Should I learn data structures in c or python?

978


What is the difference between int main and void main in c?

1096


Is c language still used?

935


how can f be used for both float and double arguments in printf? Are not they different types?

1018


What's a good way to check for "close enough" floating-point equality?

1097