2015-01-09から1日間の記事一覧
Cを使って三角形の面積を出す createTriangleArea.c #include <stdio.h> int createTriangleArea(int base,int height){ int triangleArea = base * height / 2; return triangleArea; } int main(void){ int triangleArea = createTriangleArea(50,50); printf("三角</stdio.h>…
使ってみたことが無かったので、Cを少し hello.c #include <stdio.h> int main(void){ int a = 10; printf("a:%d\n",a); return 0; } 下記がhello.cファイルを実行するシェルスクリプト hello.sh #!/bin/sh gcc -o hello hello.c ./hello ターミナルでhello.shを実行</stdio.h>…