20: Write a program to find cube of a number.

 

20: Write a program to find cube of a number.

 

Please follow me for more practicals....


Program:

#include <stdio.h>

#include <conio.h>

 

void main()

{

    clrscr();

    int num;

 

    printf("Enter the Number = ");

    scanf("%d", &num);

 

    printf("The Cube = %d", num * num * num);

    getch();

}

 

 

Please follow me for more practicals....


Output:

Enter the Number = 5

The Cube = 125

 

Algorithm:

1.      START

2.      Declare num

3.      Enter the num

4.      Display num * num * num

5.      STOP

 

Please follow me for more practicals....


Flowchart:



Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.