Toggle navigation
New
Learn
Snippets
Meta
News
About
API Docs
Source Code
Account
Register
Login
三角形の面積(ヘロンの公式)
main.c
dio.c
✖
tria.c
✖
tessera.c
✖
pente.c
✖
eksi.c
✖
Run Settings
Language
C
Language Version
latest
Run Command
Snippet Metadata
Owner
ポテト君
Created
Modified
Visibility
Public
#include <stdio.h> #include <math.h> int main(){ double a,b,c,S,s; printf("三角形の3辺を記入(空白か改行で区切る)\n有効数字は小数点以下4桁まで\n無理数(平方根等)は記号は付けずに途中まで記入\n"); scanf("%lf",&a); scanf("%lf",&b); scanf("%lf",&c); s=(a+b+c)/2; S=sqrt(s*(s-a)*(s-b)*(s-c)); printf("a:%g,b:%g,c:%gの三角形ABCの面積は%.4g",a,b,c,S); }
Editor Settings
Theme
Chrome
Clouds
Crimson Editor
Dawn
Dreamweaver
Eclipse
GitHub
Solarized Light
TextMate
Tomorrow
XCode
Kuroir
KatzenMilch
Ambiance
Chaos
Clouds Midnight
Cobalt
idle Fingers
krTheme
Merbivore
Merbivore Soft
Mono Industrial
Monokai
Pastel on dark
Solarized Dark
Terminal
Tomorrow Night
Tomorrow Night Blue
Tomorrow Night Bright
Tomorrow Night 80s
Twilight
Vibrant Ink
Key bindings
Default
Vim
Emacs
Full width
True
False
Lines
-
Auto
+
Direct link
Raw
Embed