write a program whose output will be-
1
12
123
1234
Answer Posted / riyadh ahmed
//Answer by Riyadh
#include<stdio.h>
int main ()
{
int i,j;
for (i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("
");
}
return 0;
}
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
How do we print only part of a string in c?
Write a program which returns the first non repetitive character in the string?
writ a program to compare using strcmp VIVA and viva with its output.
What is the equivalent code of the following statement in WHILE LOOP format?
What is a newline escape sequence?
how to write optimum code to divide a 50 digit number with a 25 digit number??
Write a program in c to replace any vowel in a string with z?
Can you write the algorithm for Queue?
Why does not c have an exponentiation operator?
code for replace tabs with equivalent number of blanks
What is pointer to pointer in c with example?
Difference between constant pointer and pointer to a constant.
What are the types of operators in c?
What is the best way to comment out a section of code that contains comments?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?