how can i get the output
54321
4321
321
21
1
in c programming........???? pls help......
Answers were Sorted based on User's Feedback
Answer / jayaraj.s
#include<stdio.h>
main()
{
int a,b;
for(a=5;a!=0;a--)
{
for(b=a;b!=0;b--)
{
printf("%d",b);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 87 Yes | 16 No |
Answer / narasimharao
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n;
clrscr();
scanf("%d",&n);
for(i=n;i>=1;i--)
{
for(j=i;j>=1;j--)
{
printf("%d",j);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 29 Yes | 12 No |
Answer / dattatreya
#include<stdio.h>
int main(){
char a[6]="54321";
char *p=a;
while(*p){
printf("%s ",p++);
}
return 0;
}
| Is This Answer Correct ? | 9 Yes | 3 No |
Answer / nagulmeera
#include<stdio.h>
#include<conio.h>
main()
{
for(int i=5;i<0;i--)
{
for(j=i;j!=0;j--)
{
printf("%d",j);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 5 Yes | 8 No |
Answer / mydeen
for(i=5;i<0;i++)
{
for(j=i;j<0;j++)
{
printf("%d",&i);
}
}
| Is This Answer Correct ? | 4 Yes | 7 No |
Answer / rishabh upadhyay
#include<stdio.h>
void main(){
int i,j=5,temp=0;
for (i=1;i<=5;i++)
{
for (j=5-temp;j>=1;j--)
{
printf("%d",j);
}
printf("
");
temp=temp+1;
}
}
| Is This Answer Correct ? | 1 Yes | 4 No |
Answer / aditya the future google ceo
(i=1;i<=5;i--)
{
(J=1;j<=i;j--)
| Is This Answer Correct ? | 1 Yes | 4 No |
Why ca not I do something like this?
Why is void main used?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
#define f(x) main() { printf("\n%d",f(2+2)); }
Is c procedural or functional?
What are the types of pointers in c?
How do you use a pointer to a function?
how to get starting address of a running C program
What was noalias and what ever happened to it?
program that accepts amount in figures and print that in words
2 Answers Infosys, Lovely Professional University, Wipro,
plz let me know how to become a telecom protocol tester. thank you.
What does it mean when the linker says that _end is undefined?