Write a program to print all the ASCII values and there equivalent charecters using a while loop. The ASCII values vary from 0 to 255.
#include <stdio.h>
#include <conio.h>
void main ( )
{
int co = 0;
clrscr ( );
while ( co <= 255 )
{
printf ("\n\t %3d -----> %c \n", co, co);
if ( co != 0 )
{
if ( co % 21 == 0)
{
printf ("\n\t Press any key to continue");
getch ( );
clrscr ( );
}
}
co ++;
}
getch ( );
}
No comments:
Post a Comment