LoginSignup
1
0

More than 3 years have passed since last update.

C言語の復習(計算)

Posted at

ゆっくり復習するために自分で考えてアウトプットしていくよ。

リハビリに適当に足し算引き算してみてるか。

b.c

#include <stdio.h>

int main(void)
{
    int aa, bb, cc, dd, ee, ff;

    aa=50;
    bb=5;

    cc = aa + bb;
    dd = aa - bb;
    ee = aa * bb;
    ff = aa / bb;

    printf("aaの値は%dですね~ \n", aa);
    printf("bbの値は%dですね~ \n", bb);
    printf("aa + bb の値は%dですね \n", cc);
    printf("aa - bb の値は%dですね \n", dd);
    printf("aa * bb の値は%dですね \n", ee);
    printf("aa / bb の値は%dですね \n", ff);
    return 0;
} 

これをコンパイルすると
tasi.png
ですね~はい予想通り。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0