answersLogoWhite

0

C++:

#include <iostream>

int main()

{

for(int i = 5; i > 0; --i) {

for(int j = i; j <= 5; ++j) {

std::cout << j << ' ';

}

}

return 0;

}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Write a c program to accept a numbers and generate square root cube and exponential values?

write a c program to accept a number and generate a square root cube and exponential values


What is the largest prime no that is stored in 8 bit pattern?

Write your own prime number program and find out.


Write a program to convert a 2 digit BCD number into hexadecimal number?

Write a program to convert a 2-digit BCD number into hexadecimal


Could you write a java program that randomly generate a number plate for a car registration using the random method from Maths class eg NLF810?

yes, use for loop;;


What is the answer of write a program which read no N and then generate 54321012345?

To generate the sequence &quot;54321012345&quot; based on an input number ( N ), you can write a simple program that first counts down from ( N ) to 0, then counts back up to ( N ). Here's a Python example: N = int(input(&quot;Enter a number: &quot;)) result = ''.join(str(i) for i in range(N, -1, -1)) + ''.join(str(i) for i in range(1, N + 1)) print(result) When you input ( N = 5 ), this program will output &quot;54321012345&quot;.


How can you generate a palindrome from a given number?

You write the number and then follow it with the digits in reverse order.


Can you write a program to generate sinx table where x varies from 0 to 180 in steps of 15?

Yes, I can.


Write a program to generate uppercase using cSharp?

string s = "asdfqwer"; s = s.ToUpper(System.Globalization.CultureInfo.CurrentCulture);


Write a unix program to print print a pattern?

echo 'print a pattern'


2 Write a program to convert a 2-digit BCD number into hexadecimal?

WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL


Write a c program to generate student mark details using union and find total and average and grade?

write a c program to display marks,total,average,grade using union


How do you write a number pattern?

you only need a pattern