Write a program that produces these three columns sequence nos. using loop statement
Sequence nos. Squared Squared + 5
1 1 6
2 4 9
3 9 14
4 16 21
5 25 30
Answer / ram
main()
{
int i,j,n=1;
for(i=1;i<6;i++)
{
n=i;
for(j=1;j<4;j++)
{
if(j==2)
n=n*n;
if(j==3)
n=n+5;
printf("%d ",n);
}
printf("
");
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Cluster head selection in Wireless Sensor Network using C programming language.
write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"
Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);
#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }
How can i find first 5 natural Numbers without using any loop in c language????????
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
why array index always strats wuth zero?