program for following output using for loop?
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Answer Posted / devi
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",i);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 19 Yes | 2 No |
Post New Answer View All Answers
What is a newline escape sequence?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
What is const volatile variable in c?
What is use of #include in c?
C language questions for civil engineering
What are the 4 types of organizational structures?
What is uint8 in c?
Explain what is the difference between functions getch() and getche()?
How can I delete a file?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
What do you mean by scope of a variable in c?
Where does the name "C" come from, anyway?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
What is a global variable in c?