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

c program to manipulate x=1+3+5+...+n using recursion

Answer Posted / boni ravi

#include<stdio.h>
#include<conio.h>
main()
{
int i,n;
int x=0;
clrscr();
printf("enter n value");
scanf("%d",&n);
for(i=1;i<=n;i=i+2)
{
x=i+x;
}
printf("output is%d",x);
}

Is This Answer Correct ?    9 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is header file definition?

1041


Write a code of a general series where the next element is the sum of last k terms.

1004


Why c is a mother language?

984


What are local static variables?

1098


What are loops c?

1009


Explain how do you declare an array that will hold more than 64kb of data?

1406


What are the types of variables in c?

994


What is character constants?

1141


write a program to find the given number is prime or not

4679


Explain what is wrong with this program statement?

1081


What is selection sort in c?

1031


How does selection sort work in c?

999


What is the use of void pointer and null pointer in c language?

1086


What is the difference between scanf and fscanf?

1212


write a programming in c to find the sum of all elements in an array through function.

2133