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 |
Using string functions write a program that will accept the name of the capital as input value and will display the corresponding country. ------------------------ Capitals Countries ------------------------ Capitals Countries Ottawa Canada Moscow Russia Rome Italy I can't not get it to run properly
what is exceptions?
errors are known as?
3 Answers EX, State Bank Of India SBI,
How to convert hexadecimal to binary using c language..
1 Answers Bajaj, GAIL, Satyam, Zenqa,
what is syntax error?
who was the present cheif governor of reserve bank of india
6 Answers State Bank Of India SBI,
how to convert decimal to hexadecimal without using arrays just loops
Given an int variable n that has already been declared and initialized to a positive value, and another int variable j that has already been declared, use a do...while loop to print a single line consisting of n asterisks. Thus if n contains 5, five asterisks will be printed. Use no variables other than n and j .
void main() { int i=7; printf("N= %*d",i,i); }
quoroum of computer languages?
WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf("%d%d%d",x,y,z); }
Find the error (2.5*2=5) (a) X=y=z=0.5,2.0-5.75 (b) s=15;