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


please give code for this 1 2 4 7 11 16

Answers were Sorted based on User's Feedback



please give code for this 1 2 4 7 11 16..

Answer / yogesh sharma

Try this.

#include<stdio.h>
void main()
{
int a=1,b,i=0;
while(i<=5)
{
a=a+i;
printf("%d \n",a);
i++;
}
getch();
}

Is This Answer Correct ?    98 Yes 51 No

please give code for this 1 2 4 7 11 16..

Answer / kiran

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

Is This Answer Correct ?    35 Yes 23 No

please give code for this 1 2 4 7 11 16..

Answer / ashis 6

#include<studio.h>
#include<conio.h>
Void main()
{
Int x,y;
Y=0;
For(x=1;x<=6;x++)
{
Printf("%d",y);
Y=x+y
}

Is This Answer Correct ?    9 Yes 5 No

please give code for this 1 2 4 7 11 16..

Answer / sai

#include<stdio.h>
#include<conio.h>
void main()
{
int s=1,i,n;
printf("enter a number
");
scanf("%d",&n);
for(i=0;i<=n;i++)
{
s=s+i;
printf("%3d",s);
}
getch;
}

Is This Answer Correct ?    0 Yes 0 No

please give code for this 1 2 4 7 11 16..

Answer / sai

sk rider

Is This Answer Correct ?    0 Yes 1 No

please give code for this 1 2 4 7 11 16..

Answer / santhoshreddy katam

#include<stdio.h>
#include<conio.h>
void main()
{
int a=1;
for(int i=0;i<=5;i++)
{
a=a+i;
printf("%d/n", a);
getch();
}
}

Is This Answer Correct ?    36 Yes 40 No

please give code for this 1 2 4 7 11 16..

Answer / ashish tiwari

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

Is This Answer Correct ?    4 Yes 8 No

please give code for this 1 2 4 7 11 16..

Answer / aditya

#include<stdio.h>
int main()
{
int fir=1,nex=0;
for(nex=0;nex<6;nex++)
{fir=fir+nex;
printf("%d ",fir);

}}

Is This Answer Correct ?    3 Yes 8 No

please give code for this 1 2 4 7 11 16..

Answer / guest

1 10 100 111 1011 1111

Is This Answer Correct ?    6 Yes 12 No

please give code for this 1 2 4 7 11 16..

Answer / mohan

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

Is This Answer Correct ?    6 Yes 13 No

Post New Answer

More C Interview Questions

What is sizeof array?

0 Answers  


How can you increase the allowable number of simultaneously open files?

0 Answers  


what is different between auto and local static? why should we use local static?

0 Answers  


Describe newline escape sequence with a sample program?

0 Answers  


What is the difference between abs() and fabs() functions?

0 Answers  


What is meant by gets in c?

0 Answers  


Write a c program to print the sizes and ranges of different data types in c?

1 Answers  


What are the types of assignment statements?

0 Answers  


What is variable declaration and definition in c?

0 Answers  


How to add two numbers with using function?

2 Answers   Miracle Solutions,


What is #line used for?

0 Answers  


print ur name 20,000 times without using inbuilt library functions like printf,scanf,gets,puts,getchar or putchar

4 Answers   IBM,


Categories