Computer Science, asked by dhananjay28022, 2 months ago

Write a C program to check whether a number is multiple of 10 or not. If it is then print square of this number otherwise print cube of this number

Answers

Answered by Anonymous
1

Answer:

/*C program to print square, cube and square root of all numbers from 1 to N.*/

#include <stdio.h>

#include <math.h>

int main()

{

int i,n;

printf("Enter the value of N: ");

scanf("%d",&n);

printf("No Square Cube Square Root\n",n);

for(i=1;i<=n;i++)

{

printf("%d \t %ld \t %ld \t %.2f\n",i,(i*i),(i*i*i),sqrt((double)i));

}

return 0;

}

Similar questions