how can i get output the following...
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1

and

1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

plz plz...

Answer Posted / abhishek karnani

void main ()
{
int i,k,j;
clrscr();
for (i=0;i<5;i++)
{

for (j=5;j>=i+1;j--)
{
printf ("%d",j);
}
printf("\n");
for (k=0;k<j+1;k++)
{
printf(" ");
}


}

}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of unary operators?

768


explain what is fifo?

725


Write programs for String Reversal & Palindrome check

690


Where in memory are my variables stored?

717


I have a varargs function which accepts a float parameter?

679






What is the use of a ‘’ character?

688


cavium networks written test pattern ..

3693


How can I get back to the interactive keyboard if stdin is redirected?

773


How can I write a function analogous to scanf?

772


What is the purpose of type declarations?

774


write a program to display all prime numbers

1542


State two uses of pointers in C?

725


Is it possible to have a function as a parameter in another function?

710


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

1827


What is the process to generate random numbers in c programming language?

722