Discussion Forums

New User? Please read instructions!

C program to find square and cube of given number  

  RSS

thiyagarajan
Eminent Member
Joined: 1 month  ago
Posts: 26
27/01/2017 9:37 am  

C program to find square and cube of given number


ReplyQuote
admin
Eminent Member
Joined: 5 years  ago
Posts: 26
31/01/2017 1:33 pm  

Hi,

C program is below to find square and cube of a given number.

 

#include<stdio.h>

int main()

{

    int n;

    printf("Enter a number");

    scanf("%d",&n);   

    printf("\nSquare of the number %d is %d",n,n*n);

    printf("\nCube of the number %d is %d",n,n*n*n);

    return 0;

}


ReplyQuote
  
Working

Please Login or Register

Ask your questions or clarify your/others doubts from,

✅ Online Discussion Forums by Fresh2Refresh.com





Share this website !!!
Facebook Twitter Linkedin

Close
We Support JALLIKATTU !!!
We Support JALLIKATTU!
By Fresh2Refresh.com
Show Your Support as well. Thanks!