Tuesday, February 9, 2016

C program to print Z to A using do..while loop.

This C program will print Z to A using do..while loop.


#include<stdio.h> 
int main()
{
  char ch='Z';
  do
  {
printf("%c ", ch);
ch = ch - 1;
  } while(ch >= 'A');
  return 0;
}


Output of program

Z Y X W V U T S R Q P O N M L K J I H G F E D C B A



No comments:

Post a Comment