ASP ScriptingJava ScriptingCGI ScriptingHTMLJavaLanguage CERP Education Links

LANGUAGE C

Nested While & do...While Loop

#include <stdio.h> 
main ( )
{
int x;
char i, ans;
i = ' ';
do
{
Clrscr();
 x = 0; ans = ' y' ; 
printf ("\nEnter sequence of character:");
do { 
i = getchar(); 
x++; 
} while (i != '\n');
 i = ' ' ;
printf("\n No.of chrs. entered: %d" , --x); 
printf("\nMore sequences (Y/N)?"); 
ans = getch () ; 
} while (ans =='y' II ans == 'Y' } );
}

 


Your Ad Here
Not All Of Your Subscribers Use RSS - AWeber Email Marketing
Your Ad Here