google.com, pub-6167773875660516, DIRECT, f08c47fec0942fa0 Write a program to print numbers in descending order - 2nd puc computer science

Write a program to print numbers in descending order

Write a program to print numbers in descending order

Write a c program to print numbers in descending order

#include<stdio.h>

#include<conio.h>

void main()

{

int n;

clrscr();

printf("Enter the number: ");

scanf("%d",&n);

while(n>0)

{

printf("%d,",n);

--n;

}

printf("\b.");

getch();

}

Output:

Enter the number: 10

10,9,8,7,6,5,4,3,2,1.       

Write a program to print numbers in descending order Write a program to print numbers in descending order Reviewed by Vision Academy on December 08, 2021 Rating: 5

No comments:

CheckOut

Powered by Blogger.