Program:
#include<stdio.h>
#include<conio.h>
void main( )
{
int c,n;
printf("\nEnter N value: ");
scanf("%d", &n);
c = n;
while(c>0)
{
printf("\n %d",c);
c--;
}
getch( );
}
Input/Output:
Enter N Value: 5
5
4
3
2
1
#include<stdio.h>
#include<conio.h>
void main( )
{
int c,n;
printf("\nEnter N value: ");
scanf("%d", &n);
c = n;
while(c>0)
{
printf("\n %d",c);
c--;
}
getch( );
}
Input/Output:
Enter N Value: 5
5
4
3
2
1
0 comments:
Post a Comment