wap to print 4 43 432 4321
kartik3190:
c++
Answers
Answered by
6
hope it help you....
Attachments:
Answered by
0
Below are the program in c for the above question:
Explanation:
#include <stdio.h> // header file.
int main() // main function.
{
int i,j,k; // variable declaration
for(i=1;i<5;i++) // loop to print the series
{
k=4;
for(j=1;j<=i;j++) // loop to print the number of times.
{
printf("%d",k); // print the value of the series
k--;
}
printf("\t"); // make a space.
}
}
Output:
The above program render the output "4 43 432 4321".
Code Explanation:
- The above program starts with the 4 value of K variable and first prints 4.
- Then the second loop ends for the first iteration of the first loop .
- Then the second loop executes two times for the 2nd iteration of the first loop and prints 4 and 3 and hence so on.
Learn More:
- C-Program: https://brainly.in/question/12809215
- C-Program: https://brainly.in/question/3999878
Similar questions
Science,
7 months ago
Biology,
7 months ago
English,
7 months ago
Science,
1 year ago
Computer Science,
1 year ago
Math,
1 year ago
Computer Science,
1 year ago