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 / satya
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
int main()
{
int r,n,s;
printf("Enter the number : ");
scanf("%d",&s);
n=sqrt(s);
r=n*n;
if(r==n)
printf("%d is a square of %d ",s,n);
else
printf("%d is not a square number",s);
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
How can I copy just a portion of a string?
Is void a keyword in c?
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
How can you increase the allowable number of simultaneously open files?
Write a program to print factorial of given number using recursion?
What is clrscr ()?
Explain what are the different file extensions involved when programming in c?
Tell me when would you use a pointer to a function?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
What does %p mean?
Explain spaghetti programming?
What is the use of pointers in C?
Write a program to print "hello world" without using a semicolon?
What does typedef struct mean?
What is #include cctype?