Monday, May 1, 2023

Without using power function find the cube of any given number

//Without using power function find the cube of any given number 
#include "stdio.h"
int main (){
int num,cube ;
printf ("Enter any  number:\n");
scanf ("%i",&num);
cube=num*num*num;
printf ("cube of %i is %i",num,cube);
return 0;
}

     
           output                  output              output                 output       Enter any  number:
5
cube of 5 is 125

No comments:

Post a Comment

print a multiplication table of any integer taking from user

 // print a multiplication table of any integer taking from user  #include "stdio.h" int main () { int n,mul,i; printf ("...