다른공부/C언어

c언어 교양 20160310

요카지마 2016. 3. 10. 11:22
반응형

Untitled1.exe

 

Untitled1.cpp

 

#include <stdio.h>
#include <stdlib.h>
main()
{
      int a,b,c,d;
      a=100;
      b=200;
      c=a+b;
      d=a*b;
      printf("%d+%d=%d \n" ,a,b,c);
      printf("%d*%d=%d \n" ,a,b,d);
      system("pause");
      }

 

c와d를 지우고 수식 계산한 것

 

#include <stdio.h>
#include <stdlib.h>
main()
{
      int a,b;
      a=100;
      b=200;
      printf("%d+%d=%d \n" ,a,b,a+b);
      printf("%d*%d=%d \n" ,a,b,a*b);
      system("pause");
      }

반응형

'다른공부 > C언어' 카테고리의 다른 글

c언어교양 20160405  (0) 2016.04.05
c언어 교양 20160331  (0) 2016.03.31
c언어 교양 20160329  (0) 2016.03.29
c언어 교양 20160317  (0) 2016.03.17
c언어 교양 20160315  (0) 2016.03.15