What is the code for following o/p
*
* *
* *
* *
* *
* *
* *
* *
*
Answer / unknown
#include<stdio.h>
void main()
{
int i,j,k,num = 5;
for(i = num;i > 0;i--){
for(j = 1;j <= i;j++){
printf(" ");
}
for(k = (j - 1);k < num;k++){
if(k==j-1 || k==num-1)
printf("*");
else
printf(" ");
printf(" ");
}
printf(" \n");
}
for(i = num;i > 0;i--){
for(j = (num - i);j > 0;j--){
printf(" ");
}
for(k = 0;k < i;k++){
if(k==0|| k==i-1)
printf("*");
else
printf(" ");
printf(" ");
}
printf(" \n");
}
}
Is This Answer Correct ? | 6 Yes | 1 No |
who was the present cheif governor of reserve bank of india
6 Answers State Bank Of India SBI,
void main() { int i=7; printf("N= %*d",i,i); }
How to convert hexadecimal to binary using c language..
1 Answers Bajaj, GAIL, Satyam, Zenqa,
full c programming error question based problem
void main() { int i=5; printf("%d",i+++++i); }
I'm having trouble with coming up with the correct code. Thank You!! The assignment was to write a program using string functions that accepts a price of an item and displays its coded value. The base of the keys: X C O M P U T E R S 0 1 2 3 4 5 6 7 8 9 Sample I/O Dialogue: Enter Price: 489.50 Coded Value: PRS.UX
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
what is syntax error?
how to convert decimal to hexadecimal without using arrays just loops
write the value of x and y after execution of the statements: int x=19,y; y=x++ + ++x; x++; y++;
wap for bubble sort
which typw of errors ? & how to solve it ?