The ones who are crazy enough to think they can change the world are the ones who do.- Steve Jobs
When a number is product by itself, then a resultant value is said to be a perfect square
Let us write a C program to extract all perfect square number upto 100.
#include <stdio.h> int main() { int a = 1; while(a * a < 100) { printf("%4d", a * a); a++; } return 0; }
1 4 9 16 25 36 49 64 81
Above program looks straight forward. Multiply a number by itself and check the resultant value is no more greater than 100. If the condition satisfied, print the number else exit the program.
Every number has a perfect square number, but every number is not a perfect square number.
We may make mistakes(spelling, program bug, typing mistake and etc.), So we have this container to collect mistakes. We highly respect your findings.
© Copyright 2019