Computer Science, asked by anuraganand166, 3 months ago

Write a program to input a number if number is odd print square of number

else print cube of the number.​

Answers

Answered by tanishkamoruskar
1

Answer:

include<iostream.h>

#include<conio.h>

void main()

{

clrscr();

int a,b,c;

cout<<"Enter a number: ";

cin>>a;

if(a%2==0)

cout<<"The sqaure is: "<<a*a;

else

cout<<"The cube is: "<<a*a*a;

getch();

}

Answered by prachigupta431
0

Answer:

Please mark me brainliest

Similar questions