fn f(x)

{ if(x<=0)
return;
else f(x-1)+x;
}

Answer Posted / gupta

x(x+1)/2

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

1578


what will be the output for the following main() { printf("hi" "hello"); }

9297


What is the general form of function in c?

605


Explain what are the __date__ and __time__ preprocessor commands?

582


Does * p ++ increment p or what it points to?

599






Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

1414


explain what are actual arguments?

626


Which is best book for data structures in c?

588


Explain high-order bytes.

668


How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

569


Are there namespaces in c?

556


application attempts to perform an operation?

1485


What is a dynamic array in c?

585


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

629


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5051