please give code for this 1 2 4 7 11 16
Answer Posted / 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 |
Post New Answer View All Answers
What is the difference between test design and test case design?
What are the __date__ and __time__ preprocessor commands?
c program to compute AREA under integral
What is a volatile keyword in c?
write a program fibonacci series and palindrome program in c
What are the advantages of using Unions?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
Write a program to print numbers from 1 to 100 without using loop in c?
What is difference between %d and %i in c?
What are lookup tables in c?
What are 'near' and 'far' pointers?
Explain threaded binary trees?
Write a program to check prime number in c programming?
What is main () in c?
Why do we need a structure?