Last active
April 24, 2022 15:12
-
-
Save pineapplehunter/07a0d1655390fffaf717e6a55527cc5e to your computer and use it in GitHub Desktop.
C言語のデバッグ教材
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
// a=5,b=3のとき | |
// c=a+bは8になってほしい! | |
int a = 5; | |
int b = 3; | |
int c = a - b; | |
if (c == 8) { | |
printf("成功! c = 8\n"); | |
} else { | |
printf("失敗... c = 8\n"); | |
} | |
// array の3要素目を表示(3と表示されてほしい) | |
int array[3] = {1, 2, 3}; | |
printf("arrayの3番目の値は%dです\n", array[3]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment