OIT Archive
C演習I 01
最終更新:
oit-archive
-
view
work11.c
- #include <stdio.h>
-
- int main(void){
-
-
- return 0;
- }
-
work12.c
- #include <stdio.h>
-
- int main(void){
-
- int a, b, c;
-
- a = 7;
- b = 2;
-
- c = a + b;
-
- c = a - b;
-
- c = a * b;
-
- c = a / b;
-
- c = a % b;
-
- return 0;
- }
-
work13.c
- #include <stdio.h>
-
- int main(void){
-
- int year, birthday, age;
-
-
- age = year - birthday;
-
-
- return 0;
- }
-
work14.c
- #include <stdio.h>
-
- int main(void){
-
- int number, kurai, x;
-
-
- x = number / kurai % 10;
-
-
- return 0;
- }
-
work15.c
- #include <stdio.h>
-
- int main(void){
-
- int money, price, num, rem;
-
-
- num = money / price;
-
- rem = money - price * num;
-
- return 0;
- }
-
work16.c
- #include <stdio.h>
-
- int main(void){
-
- int pen, dozen, rest;
-
-
- dozen = pen / 12;
- rest = pen %12;
-
-
- return 0;
- }
-
work17.c
- #include <stdio.h>
-
- int main(void){
-
- int before, after, k1, k2, k3;
-
-
- k3 = before / 100 % 10;
- k2 = before / 10 % 10;
- k1 = before % 10;
- after = k1 * 100 + k2 * 10 + k3;
-
-
- return 0;
- }
-
work18.c
- #include <stdio.h>
-
- int main(void){
-
- int dec, d0, d1, d2, d3;
-
-
- d0 = dec % 2;
- d1 = dec / 2 % 2;
- d2 = dec / 2 / 2 % 2;
- d3 = dec / 2 / 2 / 2 % 2;
-
-
- return 0;
- }
-