please give code for this 1 2 4 7 11 16
Answer Posted / 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 View All Answers
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Explain the difference between the local variable and global variable in c?
What is static function in c?
How can I manipulate strings of multibyte characters?
Simplify the program segment if X = B then C ← true else C ← false
Write a program to reverse a linked list in c.
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
How many types of errors are there in c language? Explain
What is the difference between far and near in c?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
Is fortran faster than c?
What is the use of printf() and scanf() functions?
Explain the difference between call by value and call by reference in c language?
Define recursion in c.
What is a null string in c?