Display this kind of output on screen.
1
0 1
1 0 1
3. Display this kind of output on screen.
1
1 0
1 0 1
4. Display this kind of output on screen.
1
1 0
1 0 1
5.Display this kind of output on screen.
1
2 3
4 5 6
7 8 9 10
Answer / vasanti
void main()
{
int i,j;
for(i=0;i<=2;i++)
{
for(j=2;j>i;j--)
printf(" ");
for(j=1;j<(i+1);j++)
{
printf("%d",mod(j-i));
}
printf("/n");
}
getch();
}
------------------------------\void main()
{
int i,j;
for(i=0;i<=2;i++)
{
// for(j=2;j>i;j--)
// printf(" ");
for(j=1;j<(i+1);j++)
{
printf("%d",mod(i-j));
}
printf("/n");
}
getch();
}
--------------------------------
void main()
{
int i,j;
for(i=0;i<=2;i++)
{
//for(j=2;j>i;j--)
// printf(" ");
for(j=1;j<(i+1);j++)
{
printf("%d",mod(j-i));
}
printf("/n");
}
getch();
}
-------------------------
void main()
{
int i,j,k=1;
for(i=0;i<=3;i++)
{
for(j=3;j>i;j--)
printf(" ");
for(j=1;j<(i+1);j++)
{
k=k+1;
printf("%d",k);
}
printf("/n");
}
getch();
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Write down the difference between c. Loop and goto statement d. (!0) and (!1) e. (1= =! 1) and (1!=1) f. NULL and !NULL
how tally is useful?
UINT i,j; i = j = 0; i = ( i++ > ++j ) ? i++ : i--; explain pls....
void main() { int i=1; printf("%d%d%d",i,++i,i++); } Cau u say the output....?
what is meant by linking error? how can i solve it? if there is a linking error " unable to open file 'cos.obj'? then what should i do?
what is macro in c? Difference between single linked list & double linked list what is fifo & lifo? what is stack & queue?
Declaration of Cube Guys please help me.. Is this a right way to declare cube.? If i Compile it. It Says: Cube undeclared what should i do? Please help \thanks in advanced #include<stdio.h> #include<math.h> #include<conio.h> main( ) { float x,y; while(x++<10.0) { printf("Enter Number:"); scanf("%d", &x); y = cube(x); printf("%f %f %f \n", x,pow(x,2),y); cube(x); } { float x; float y; y = x*x*x; } getch(); return (y); }
What is the code for following o/p * * * * * * * * * * * * * * * *
Find the error (2.5*2=5) (a) X=y=z=0.5,2.0-5.75 (b) s=15;
I am using Qt 5.6 during compilation it stops and gives error about Qmake The process "C:QtQt5.6.35.6.3msvc2015_64inqmake.exe" crashed. Error while building/deploying project untitled1 (kit: Desktop Qt 5.6.3 MSVC2015 64bit) When executing step "qmake"
Why are memory errors hard to debug?
How to create a program that lists the capital country when told what the original country is? (Terribly sorry, I'm a novice programmer and would appreciate any help ;). Cheers, Alexxis