Skip to content

Instantly share code, notes, and snippets.

@Code-Hex
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Code-Hex/623b2d1ebc74c2695aa4 to your computer and use it in GitHub Desktop.
Save Code-Hex/623b2d1ebc74c2695aa4 to your computer and use it in GitHub Desktop.
4-3
#include <stdio.h>
int main(){
float vertically, horizontally;
float inch = 2.54;
float ans;
printf("まずは横の入力\n");
scanf("%f",&vertically);
printf("よしよし、次は縦の入力\n");
scanf("%f",&horizontally);
vertically *= inch;
horizontally *= inch;
ans = vertically * horizontally;
printf("面積は%05f cm^2だよー\n", ans);
return 0;
}
@walkingmask
Copy link

単位はしっかり書こう!
(俺も忘れてたけどw)

@Code-Hex
Copy link
Author

了解w

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment