Help me to solve c programming

By using c programming Find a cube of any numbers

#include<stdio.h>

int main()
{
int number, cube;

printf(" \n Please Enter any integer Value : “);
scanf(”%d", &number);

cube = number * number * number;

printf("\n Cube of a given number %d is = %d", number, cube);

return 0;
}

1 Like

[quote=“sameerdukare123, post:2, topic:2178, full:true”]
#include<stdio.h>

int main()
{
int number, cube;

printf(" \n Please Enter any integer Value : “);
scanf(”%d", &number);

cube = number * number * number;

printf("\n Cube of a given number %d is = %d", number, cube);

return 0;
}
[your mistake in printf line code write inveted comma place of double quote]
program code:
#include<stdio.h>

int main()
{
int number, cube;

printf(" \n Please Enter any integer Value :");
scanf("%d", &number);

cube = number * number * number;

printf("\n Cube of a given number %d is = %d", number, cube);

return 0;
}

you can use float data type to initialize ,that gives an appropriate outputs