Computer Science, asked by meerdara, 3 months ago

Write a program using loops to produce the following output using loops: (10)

1 2 3 4 5 6 7 6 5 4 3 2 1
1 2 3 4 5 6 ■ 6 5 4 3 2 1
1 2 3 4 5 ■ ■ ■ 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

Answers

Answered by gourivamsimanchem
0

Answer:

if it is useful please mark me as brainlist please

Explanation:

1. Write a program in C to display the first 10 natural numbers. Go to the editor

Expected Output :

1 2 3 4 5 6 7 8 9 10

Click me to see the solution

2. Write a C program to find the sum of first 10 natural numbers. Go to the editor

Expected Output :

The first 10 natural number is :

1 2 3 4 5 6 7 8 9 10

The Sum is : 55

Click me to see the solution

3. Write a program in C to display n terms of natural number and their sum.Go to the editor

Test Data : 7

Expected Output :

The first 7 natural number is :

1 2 3 4 5 6 7

The Sum of Natural Number upto 7 terms : 28

Click me to see the solution

4. Write a program in C to read 10 numbers from keyboard and find their sum and average. Go to the editor

Test Data :

Input the 10 numbers :

Number-1 :2

...

Number-10 :2

Expected Output :

The sum of 10 no is : 55

The Average is : 5.500000

Click me to see the solution

5. Write a program in C to display the cube of the number upto given an integer. Go to the editor

Test Data :

Input number of terms : 5

Expected Output :

Number is : 1 and cube of the 1 is :1

Number is : 2 and cube of the 2 is :8

Number is : 3 and cube of the 3 is :27

Number is : 4 and cube of the 4 is :64

Number is : 5 and cube of the 5 is :125

Click me to see the solution

Similar questions