C Programming - Find Perfect Square Between Two Numbers

TechMahindra Interview Question, this is how I did that.

Solution:


#include < stdio.h >
#define START 10
#define STOP 100
int main()
{
int i=0;
while( (i*i) < START ) i++;
while( (i*i) < STOP ) {
printf("%d ",i*i);
i++;
}
}

Labels:


About this entry