読み込んだ整数の10倍の値を表示
明解C言語 入門編 > 1. まずは慣れよう >
読み込んだ整数の10倍の値を表示
C++
#include <iostream.h>int main(int argc, char* argv[])
{
int no;cout << "整数を入力してください:";
cin >> no;cout << "その数の10倍は" << no * 10 << "です。\n";
return 0;
}
実行結果
T:\>lesson004\project1.exe
整数を入力してください:37
その数の10倍は370です。