Wednesday, October 21, 2020

if the given number is greater than 0 calculate its square and cube - c program

#include <stdio.h>

int main() 

{

    int n;

    printf("Enter a number:");

    scanf("%d", &n);

    if(n>0)

    {

        printf("Number = %d, Square = %d, Cube = %d", n, n*n, n*n*n);

    }

}

No comments:

Post a Comment

POV: You finally realize how much your father did for you. ❤️ I Happy Fathers Day

YouTube Video   Hi. So on this special occasion of the father's day, um I would like to say a very happy father's day to all the lov...