C exercises (17-6) Atom2

Atom基本的な操作(2)

#include <stdio.h>
 
int main(void)
{
  char var;
  int a, b, c;
  float x;

  /* 整数(文字)型 */
  var = 'A';
  printf("こんにちは %c\n", var);
 
  /* 整数 */
  a = 1;
  b = 2;
  c = 3;
  printf("%d %d %d です。\n", a, a+b, c);
 
  /* 浮動小数点数型(単精度実数) */
  x = 33.333;
  printf("%f\n", x);
 
  return 0;
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *