#include using namespace::std; int main() { int x = 0; int n; cout << "1以上100以下の整数Nを入力してください" << endl; cin >> n; int m = 0; if (m=1) { for(m==1; m<=n; ++m) { x += m; } cout << x << endl; } else if (n>100 || n<1) { cout << "1以上100以下の整数を入力してください" << endl; } }