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


To generate the series 1+3+5+7+... using C program

Answers were Sorted based on User's Feedback



To generate the series 1+3+5+7+... using C program..

Answer / shiva

for(int a=0;a<10;a++){
(a&1)?printf("%d\n",a):printf("\n");
}

Is This Answer Correct ?    8 Yes 6 No

To generate the series 1+3+5+7+... using C program..

Answer / nasif

#include<stdio.h>
int main()
{
int n,i,d=1,sum=0;
scanf("%d", &n);
for(i=1;i<=n;d=d+2){
sum=sum+d;
i++;
}
printf("summation is %d", sum);
return 0;
}

Is This Answer Correct ?    1 Yes 0 No

To generate the series 1+3+5+7+... using C program..

Answer / meheka

#inclined <stdio.h>
int main ()
{
int I=1,n,sum=0;
scanf("%d",&n);
while(i<=n)
sum=sum+I;
{
printf("%d",sum);
I=I+2;
}
return 0:

Is This Answer Correct ?    1 Yes 0 No

To generate the series 1+3+5+7+... using C program..

Answer / beetha poulose

#include<include>
int main ()
{
int j,i,n,sum=0;
Print("enter n");
scanf ("%d",&n);
For (i=1,j=1; j<=n; i=i+5,j++)
{
Sum=sum +i;
}
Prinrf ("sym=%d",sum);
Return 0;
}

Is This Answer Correct ?    1 Yes 0 No

To generate the series 1+3+5+7+... using C program..

Answer / nishant

#include<stdio.h>
#include<conio.h>
void main()
{
int n,i=1,sum=0;
clrscr();
printf("enter the value for n:");
scanf("%d",&n);
while(i<=n)
{
sum=sum+i;
i=i+2;
}
printf("the series is =%d");
getch()
}

Is This Answer Correct ?    0 Yes 0 No

To generate the series 1+3+5+7+... using C program..

Answer / aditya parashar

#include<iostream.h>
void main ()
{int s,n;
cout <<"For finding sum of series
1+3+5.. till n terms enter value of n: ";
cin>>n;
s=n*n;
cout<<"
sum of series 1+3+5+.. till n
terms is: "<<s;
}
[Note:- only output matters]

Is This Answer Correct ?    0 Yes 0 No

To generate the series 1+3+5+7+... using C program..

Answer / medo

//*I know this is a different program but i want you to try
it!*//



#include <stdio.h>
void main()
{
int i,j;

for(i=1;i<=4;i++)
{
for(j=1;j<=8;j++)
{printf("* ");}
printf("\n");

for(j=1;j<=8;j++)
{printf(" *"); }
printf("\n");
}
}

Is This Answer Correct ?    7 Yes 8 No

To generate the series 1+3+5+7+... using C program..

Answer / parthibanselvaraj

the series seems to be infinite . so you need to restrict
it to some ceiling.

Is This Answer Correct ?    10 Yes 19 No

Post New Answer

More C C++ Errors Interview Questions

Write a c-programe that input one number of four digits and find digits sum?

2 Answers  


#include<>stdio.h> #include<>conio.h> { printf("hello"); void main() getch(); } what the out put of this program and why ......plz clear my answer

10 Answers   Wipro,


Write down the difference between c. Loop and goto statement d. (!0) and (!1) e. (1= =! 1) and (1!=1) f. NULL and !NULL

0 Answers  


which typw of errors ? & how to solve it ?

0 Answers  


what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }

4 Answers  


#include<stdio.h> void main() { int i=1; printf("%d%d%d",i++,++i,i); }

19 Answers  


Declaration of Cube Guys please help me.. Is this a right way to declare cube.? If i Compile it. It Says: Cube undeclared what should i do? Please help \thanks in advanced #include<stdio.h> #include<math.h> #include<conio.h> main( ) { float x,y; while(x++<10.0) { printf("Enter Number:"); scanf("%d", &x); y = cube(x); printf("%f %f %f \n", x,pow(x,2),y); cube(x); } { float x; float y; y = x*x*x; } getch(); return (y); }

2 Answers  


how tally is useful?

2 Answers  


what is syntax error?

3 Answers  


To generate the series 1+3+5+7+... using C program

18 Answers  


how to convert decimal to hexadecimal without using arrays just loops

2 Answers  


Using string functions write a program that will accept the name of the capital as input value and will display the corresponding country. ------------------------ Capitals Countries ------------------------ Capitals Countries Ottawa Canada Moscow Russia Rome Italy I can't not get it to run properly

1 Answers   AMA,


Categories