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 |
Is this code legal? int *ptr; ptr = (int *) 0x400;
Write a program to implement the motion of a bouncing ball using a downward gravitational force and a ground-plane friction force. Initially the ball is to be projected in to space with a given velocity vector
what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }
program to find magic aquare using array
write a program to count the number the same (letter/character foreg: 's') in a given sentence.
Finding a number multiplication of 8 with out using arithmetic operator
Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])
String reverse with time complexity of n/2 with out using temporary variable.
Printf can be implemented by using __________ list.
void ( * abc( int, void ( *def) () ) ) ();
main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }
#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }