progrem to generate the following series
1
12
123
1234
12345
Answers were Sorted based on User's Feedback
int main()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d\t",j);
}
printf("\n");
}
return 0;
}
Is This Answer Correct ? | 115 Yes | 27 No |
Answer / shakil ahmed
#include<stdio.h>
#include<conio.h>
main()
{
int i, j;
for(i=1; i<=5; i++)
{
for(j=1; j<=i; j++)
{
printf("%d",j);
}
printf("\n");
}
}
Is This Answer Correct ? | 65 Yes | 16 No |
Answer / mustafiz
#include<stdio.h>
int main()
{
int row,i;
printf("Enter row number:\n");
scanf("%d",&row);
int sum=0;
for(i=1;i<=row;i++)
{
sum = sum *10 +i;
printf("%d\n",sum);
}
return 0;
}
Is This Answer Correct ? | 25 Yes | 12 No |
Answer / f.hnayan
#include<stdio.h>
#include<conio.h>
main()
{
int a,b;
for(a=0;a<=4;a++)
{
for(b=1;b<=(a+1);b++)
{
printf("%d\t",b);
}
printf("\n");
}
return 0;
}
Is This Answer Correct ? | 11 Yes | 5 No |
Answer / banavathvishnu
main()
{
int a;
int temp =0;
for(i=1;i<=5;i++)
{
temp = temp *10 +i;
printf("%d",temp);
}
Is This Answer Correct ? | 23 Yes | 19 No |
Answer / sachin
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,row;
clrscr();
printf("
How many rows
");
scanf("%d",&row);
for(i=1;i<=row;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("
");
}
getch();
}
Is This Answer Correct ? | 3 Yes | 2 No |
What is malloc calloc and realloc in c?
#include<stdio.h> int main() { int i=0,j=1,k=2,m,n=0; m=i++&&j++&&k++||n++; printf("%d,%d,%d,%d,%d",i,j,k,m,n); }
12 Answers Capital IQ, Sasken,
write a program for size of a data type without using sizeof() operator?
22 Answers HCL, IBM,
What is the purpose of 'register' keyword?
Simplify the program segment if X = B then C ← true else C ← false
difference between object file and executable file
What header files do I need in order to define the standard library functions I use?
write a program without using main function?
how to swap 4 number without using temporary number?
A MobileNumber is a VIP number if it satisfy the following conditions. The operator should be Vodafone. Atleast one 0 (Zero) should be exist in mobile number. The number should not end with 8. The single digit sum of all the digits in the number should be equal to 9. For example if the number is 9876543210, the sum is 9+8+7+...+1+0 = 45. Sum of 4+5 = 9. Write a method: private boolean isVIPMobileNumber(String mobileNum, String operator) mobileNum phone number operator mobile operator as bsnl, Vodafone
what is c
How do you use a pointer to a function?