#include<iostream>
using namespace std;
void main()
{
 int total=0;
 for(int i=1;i<=5;i++){
  cout<<"i ="<<i<<endl;
  total+=i;
  cout<<"total ="<<total<<endl;
 }
 cout<<"1부터"<<i-1<<"까지의 합계는 "<<total<<"입니다"<<endl;
}


간단한 1부터 5까지의 합을 for문 이용해서 구하는건데
i가 선언되지 않은 식별자라네.. 음..왜지 왜 잘못한거 없는것같은데 ㅎㅋ