Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //find out square and cube of given number and number given by user.
- /*
- Input - 5
- Output - Square of 5 is 25 and Cube of 5 is 125
- */
- #include<stdio.h>
- #include<conio.h>
- int main()
- {
- int no1,s;//variable declartion part
- printf("\nEnter any no =");
- scanf("%d",&no1);
- s=no1*no1;
- printf("\n Square of %d is %d",no1,s);
- s=no1*no1*no1;
- printf("\n Cube of %d is %d",no1,s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment