please give code for this 1 2 4 7 11 16
Answer Posted / 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 |
Post New Answer View All Answers
What is pragma in c?
What is the size of structure pointer in c?
What is a const pointer in c?
what will be maximum number of comparisons when number of elements are given?
Why is c called c not d or e?
When can a far pointer be used?
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier. Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed. When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed. Sequence of take-off is the sequence of addition to the waitlist
How is pointer initialized in c?
What is an example of structure?
What do you mean by scope of a variable in c?
What are multidimensional arrays?
Explain 'bit masking'?
Why dont c comments nest?
What is the difference between text files and binary files?
How will you divide two numbers in a MACRO?