write a program whose output will be-
1
12
123
1234
Answers were Sorted based on User's Feedback
Answer / devi
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
for(i=1;i<=4;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}
Is This Answer Correct ? | 51 Yes | 15 No |
Answer / aditya nath
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}
Is This Answer Correct ? | 18 Yes | 12 No |
Answer / chaitanya
#include<stdio.h>
void main()
{
int s,i,j,n=1;
printf("enter the length of the sequence
");
scanf("%d",&s);
for(i=1;i<=s;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf(" ");
}
}
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / abc_efg
#include<iostream.h>
#include<conio.h>
main()
{
{
for(i=1;i<=4;i++)
{cout<<"\n"
}
for (j=1;j<=4;j++)
}
return 0;
}
Is This Answer Correct ? | 5 Yes | 7 No |
Answer / tanish kumar
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr ();
int i, j, n;
cout <<"Enter the value of n=";
cin>>n;
for (i=1;i <=n;i++)
{
for (j=1;j <=i;j++)
{
cout <<j <<" ";
}
cout <<endl;
}
getch ();
}
Is This Answer Correct ? | 2 Yes | 5 No |
Answer / ck
#include<stdio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j==)
{
printf("%d ",j);
}
printf("/n");
}
getch();}
Is This Answer Correct ? | 4 Yes | 10 No |
Answer / 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 |
Answer / abhishek
#include <iostream>
using namespace std;
int main() {
int i,c=1,p=0;
for(i=0;i<4;i++){
p=p*10+c;
cout<<p<<"
";
c++;
}
return 0;
}
Is This Answer Correct ? | 1 Yes | 7 No |
Answer / chaitali shinde
mian()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("1");
1++;
}
printf("\n");
}
getch();
}
Is This Answer Correct ? | 8 Yes | 16 No |
Answer / shrikantauti
main()
{
int i;
for (i=1;i<=4;i++)
{
printf(i);
}
}
Is This Answer Correct ? | 4 Yes | 28 No |
What is the difference between struct and union in C?
Why main function is special give two reasons?
Can we initialize extern variable in c?
What is the memory allocated by the following definition ? int (*x)();
main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) { x=x+y; } y++; printf("The values of x and y are %d and %d."x,y); } What is the output?
what is the difference between structure and union?
What is the difference between void main() and void main (void) give example programme?
code for replace tabs with equivalent number of blanks
What is memory leak in c?
#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } what will happen if you executed this code?
dynamically allocate memory for linear array of n integers,store some elements in it and find some of them
what is void pointer?