Q2-2-1
C
/*Q2-2-1*/
#include <stdio.h>
int main()
{
int g,h;
float x,y;
g=37;
h=7;
x=3.4;
y=23.4;
printf("%d + %d = %d\n", g, h, g+h);
printf("%d - %d = %d\n", g, h, g-h);
printf("%d × %d = %d\n", g, h, g*h);
printf("%d ÷ %d = %d\n", g, h, g/h);
printf("%d ÷ %dの余り = %d\n", g, h, g%h);
printf("%.1f は %.1f の %.1f%%\n", x, y, y/x);
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.