C Program to Print Following Output

C Program to Print Following Output

Hello Sir I wnat to print Followning output in C Language with for loop How I Can Print it?
5
5 4
5 4 3
5 4 3 2
5 4 3 2 1
View Answers

February 15, 2010 at 2:58 PM

Hi Friend,

Try the following:

#include <stdio.h>
#include <conio.h>
void main()
{
int i=0;
int j=0;
for (i=5; i >=1; i--){
for (j = 5; j >= i; j--)
printf(" %d",j);
printf(" \n");
}
getch();
}

Thanks

May 5, 2012 at 9:09 PM

4 3 4 2 3 4 1 2 3 4


May 5, 2012 at 9:09 PM

4 3 4 2 3 4 1 2 3 4

Ads









Related Tutorials/Questions & Answers:
C Program to Print Following Output - Development process
C Program to Print Following Output  Hello Sir I wnat to print Followning output in C Language with for loop How I Can Print it? 5 5 4 5 4 3 5 4 3 2 5 4 3 2 1  Hi Friend, Try the following: #include
How to print the following output using c program
How to print the following output using c program  1) 4 3 4 2 3 4 1 2 3 4 2) A B C D E F G H I J
Advertisements
C program to print the following
C program to print the following  Hello, Some one help me with a "C Program" to print the following as output: 4444444 4333334..., that is why I choosed Java Beginners, but please give me a C program
write a program in C to print following triangles on the screen
write a program in C to print following triangles on the screen  write a program in C to print following triangles on the screen
how to get following answer in turbo c program
how to get following answer in turbo c program  input 123456789 output 1 2 3 4 5 6 7 8 9
c programming..what wil be the output of this program
c programming..what wil be the output of this program   #include int main() { int arr[] = {0,1,2,3,4}; int i,*ptr; for (ptr=arr+4; ptr= arr; ptr--) { printf("%d",*ptr
how to get following output
how to get following output  input 123456 output 1 2 3 4 5 6
how to get following output
how to get following output  input 123456 output 1 2 3 4 5 6
Print the following format
Print the following format  how to print the following format given string "00401121" in java 0-** 1-* 2-* 3- 4
output of the program
output of the program  public static int sum(List list) { int sum = 0; for ( Iterator iter = list.iterator(); iter.hasNext(); ) { int i = ((Integer)iter.next()).intValue(); sum += i; } return sum
print array in following format
print array in following format  i want print two array in following... want output as: 1 2 3 11 12 13 4 5 6 14 15 16 7 8 9 17 18 19   Here is a code that displays the array values in the following pattern: 1 2
how to print the following pattern
how to print the following pattern  Hello hEllo heLlo helLo hellO pls reply soon its an emergency   class StringPattern { public static void main(String[] args) { String st="hello
ModuleNotFoundError: No module named 'c-print'
ModuleNotFoundError: No module named 'c-print'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'c... to install padas library. You can install c-print python with following command
printing the following output using for loop
printing the following output using for loop  1 2 3 3 4 5 4 5 6 7
printing the following output using for loop
printing the following output using for loop  1 2 3 3 4 5 4 5 6 7
c program
c program  plz send me program for this. write a program to print the following code? (in c language) 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 11 2 3 4 5 6 7 8 9 10
Write a java program that prints the decimal representation in reverse. (For example n=173,the program should print 371.)c
Write a java program that prints the decimal representation in reverse. (For example n=173,the program should print 371.)c  class rose { int n...); System.out.println("\nReverse the number"+i); S.out(); } }   print
C program
a function to print names of all students who joined in a particular year. (c)Write a function to print the data of a student whose roll number is given...C program  hi, here is my question: Create a structure to specify
c program
c program  plz send me program for this. write a program to print the following code? 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 11 2 3 4 5 6 7 8 9 10 11 12 3 4
c++ program
c++ program  Write a program which reads a text from the keyboard and displays the following information on the screen in two columns: (a) Number of lines (b) Number of words (c) Number of characters Strings should be left
program of c
program of c  write a program in c to display a to z without using printf or scanf statements or header files
i want print the following out put
i want print the following out put  Hello sir i want the following out put can u provide the program in c# o/p; HELLOLLEH HELLLEH HELEH HEH H
program in c
program in c  Write a program that inputs five different integers from the keyboard, then print the sum, the product, the smallest and the largest of these numbers. Use only single selection form of if statement. For example: 1 3
C Program
C Program  Why doesn't the code int a = 1000, b = 1000; long int c = a * b; work? plz help me sir
How to print the following pattern in java?
How to print the following pattern in java?  How to print the following pattern in java? he he is he is going he is going in   import java.io.*; class StringPattern { public static void main(String[] args
c program
c program  How to convert binary digits to decimal number without using power function
c program
c program  WAP to show the area of a perimeter of a rectanglar by using input command
write following program
write following program  Q1 What is the difference between single threaded application and multithreaded application? What are the benefits of multi... a no. If a no is even then print it else throw a user defined exception Q5 Draw
need a java program for the following
need a java program for the following  Write a java program with three horizontal sliders. Name the sliders, the first one as red, the second one as green and the third one as blue. You design the program such that on varying
core java code for following program
. The following are the guidelines while writing this program Only command line based...core java code for following program  We are hosting the Olympic games. Write a program that will track all the details of this hosting
program to print total marks
program to print total marks  program to input total marks out of 600 marks as an argument and print the stream allotted using the following criteria 401 & above - PCM 301-400 - ZBC 201-300- Commerce 101-200 - Arts
write a program to print
write a program to print   write a program to print following 1 2 3 4 5 4 3 2 1 1 2 3 4 4 3 2 1 1 2 3 3 2 1 1 2 2 1 1 1
I/O Program output error
I/O Program output error  Hello All, I am working on a program that requries me to read and analyze a .txt file and output the results to a .txt file, but I am getting incorrect output. I have been successfull with part
A Program To Print A Equilateral Triangle
A Program To Print A Equilateral Triangle  Write A program to Print Following In Java : 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
program that uses while loops to perform the following steps :
program that uses while loops to perform the following steps :  Write a program that uses while loops to perform the following steps : a. Prompt... inclusive. c. Output the sum of all the ven number between FirstNum and secondNum
method overloading in c program
method overloading in c program  how is method overloading in C program is different from C++ program
malloc in c example program
malloc in c example program  What is malloc in c? Please explain the term using an example in C program. Thanks
about a program in c language
about a program in c language   Write a program that inputs five different integers from the keyboard, then print the sum, the product, the smallest and the largest of these numbers. Use only single selection form of if statement
C Program with Database Connectivity
C Program with Database Connectivity  How To Connect MySQL Database in C Program with Graphics
C Programming SubString Program
entered to check PROGRAM is exists in given three strings then output...C Programming SubString Program  Sir I want to Check whether the Single Substring is present in the given 3 string. characters. eg if i entered
Write a program to print using for loop
Write a program to print using for loop  Write a program to print using for loop * * * *  
Write a program named InternetCharge_YourLastName that do the following:
Write a program named InternetCharge_YourLastName that do the following: ... of access are provided. Additional hours are $1.00 per hour. Package C: For $39.95 per month unlimited access is provided. Write a program named InternetCharge
c++ program of inheritance
c++ program of inheritance   Assume that a bank maintains two kinds... the following tasks: (a) Accept deposit from a costumer and update the balance. (b) Display the balance (c) Compute and deposit interest. (d) Permit
Shortest the program as possible but output will not change
Shortest the program as possible but output will not change  #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #define MAX_BUF 50 // Size of the buffer to hold intermediate
Shortest the program as possible but output will not change
Shortest the program as possible but output will not change  #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #define MAX_BUF 50 // Size of the buffer to hold intermediate
how to sort the elements of hashmap and to print output the key and the value attached to it
how to sort the elements of hashmap and to print output the key and the value attached to it  how to sort the elements of hashmap and to print output the key and the value attached
C Program....PLEASE HELP
C Program....PLEASE HELP  For this assignment, you are to write a program that calculates points along a rhodonea curve, a.k.a. a mathematical rose, and produces a simple character plot of the results, using functions, arrays
C++ program not running
C++ program not running  Hi, this program need to ask 10 random questions with a random month name. Example: RUN How many days are there in the month of March? 28 No March has 31 days. How many days are there in the month
please give me a java program for the following question
please give me a java program for the following question  Write a java program that displays multiple frames : Step 1: Design a frame with three..."); Icon icon1 = new ImageIcon("c:/fruit.png"); JButton button2=new JButton("Bird
write a java program that implements the following classes:
write a java program that implements the following classes:  write a java program that implements the following classes: A) a) Point in the Cartesian coordinate system. b) Circle with a given center and radius c) Cylinder

Ads