how to print this pyramid *
*
*
* * * * * * *
*
*
*
Answer Posted / j.n.abhishek
void main()
{
int n,i,j;
clrscr();
printf("ENTER THE LIMIT:");
scanf("%d",&n);
for(i=0;i<=(2*n);i++)
{
if(i!=n)
{
for(j=0;j<(2*n);j++)
{
printf(" ");
}
printf("+\n");
}
else
{
for(j=0;j<=(2*n);j++)
{
printf("+ ");
}
printf("\n");
}
}
getch();
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is printf () in c?
Discuss the function of conditional operator, size of operator and comma operator with examples.
How arrays can be passed to a user defined function
5 Write an Algorithm to find the maximum and minimum items in a set of ānā element.
What is variable and explain rules to declare variable in c?
i want to know the procedure of qualcomm for getting a job through offcampus
#include
What is declaration and definition in c?
What is a char c?
what is stack , heap ,code segment,and data segment
What is a stream in c programming?
What are the characteristics of arrays in c?
Why c is called object oriented language?
In a header file whether functions are declared or defined?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.