Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 ?    71 Yes 36 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 ?    15 Yes 15 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 ?    0 Yes 0 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 ?    33 Yes 35 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 ?    3 Yes 7 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 11 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 11 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 ?    2 Yes 7 No

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

Answer / test

test

Is This Answer Correct ?    3 Yes 10 No

Post New Answer



More C Interview Questions

What is int main () in c?

0 Answers  


Is main() function predfined or userdefined?

11 Answers  


What is the difference between int main and void main?

0 Answers  


main() { static char *s[]={"black","white","yellow","voilet"}; char **ptr[]={s+3,s+2,s+1,s}, ***p; p=ptr; **++p; printf("%s",*--*++p+3); }

0 Answers  


Differentiate between the expression “++a” and “a++”?

0 Answers  






What is scanf () in c?

0 Answers  


How can I do graphics in c?

0 Answers  


how to convert an char array to decimal array

4 Answers  


What is the use of getchar functions?

0 Answers  


difference between my-strcpy and strcpy ?

3 Answers   Geometric Software, IIM, Infosys,


c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

0 Answers  


what are the facialities provided by you after the selection of the student.

0 Answers   TCS,






Categories