Write a program which take a integer from user and tell
whether the given variable is squar of some number or not.
eg: is this number is 1,4,9,16... or not
Answer Posted / rajesh kumar
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf("\n give an integer value");
scanf("%d",&a);
if((a/(a/2))==(a/2))
printf("\n the variable is square of some no");
else
printf("\n the no is not square of some no");
getch();
}
| Is This Answer Correct ? | 2 Yes | 32 No |
Post New Answer View All Answers
What is the c language function prototype?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
What is "Hungarian Notation"?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What is a null string in c?
What would be an example of a structure analogous to structure c?
Are there any problems with performing mathematical operations on different variable types?
What are the different types of constants?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
What is use of pointer?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
What kind of structure is a house?
What is the use of pointers in C?
What is a example of a variable?