C Programming language

adplus-dvertising
C Program example: Odd Loops in C
Previous Home Next
Program of Odd Loop using C
#include<stdio.h>
#include<conio.h>
main()
{
	char name='p';
	int a,c;
	clrscr();
	while(name=='p')
	{
		printf("enter any no. a");
		scanf("\n%d",&a);
		c=a*a;
		printf("%d",c);
		printf("\nenter the another char ");
		scanf("\n%c",&p);
	}
	getch();
}
Output :

Enter any no. a

2

4

enter the another char

a

Enter any no. a

5

25

enter the another char

p

Previous Home Next