2-4
C
/*E2-4*/
/*実数の2乗と3乗*/
#include <stdio.h>
int main()
{
double a,b,c;
a=2.5;
b=a*a;
c=a*a*a;
printf("2.5の2乗 = %.2f\n",b);
printf("2.5の3乗 = %.3f\n",c);
return 0;
}
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.