C/C++の宿題を片付けます 100at TECH
C/C++の宿題を片付けます 100 - 暇つぶし2ch305:デフォルトの名無しさん
07/11/27 15:40:23
>>304
ついでにいろいろ修正した。

#include <stdio.h>
#include <stdlib.h>

#ifdef ZEI
# define a ZEI
#else
# define a 5
#endif
#define TAX(x,y) (x+y)*a/100
#define PRICE(x,y) (x+y)+(x+y)*a/100

int main(void)
{
  int x,y;
  printf("lnput an integer x:");
  scanf("%d",&x);
  printf("lnput an integer y:");
  scanf("%d",&y);
#ifdef DEBUG
  printf("tax of x+y %d \n", TAX(x,y));
#endif
  printf("price of x+y %d \n", PRICE(x,y));
  return 0;
}


次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch