Write a program to input a number if number is odd print square of number
else print cube of the number.
Answers
Answered by
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
0
Answer:
Please mark me brainliest
Similar questions
Math,
1 month ago
Business Studies,
1 month ago
English,
3 months ago
Math,
9 months ago
Biology,
9 months ago