데블스캠프2006/월요일/연습문제/if-else/정승희

1번째문제
~cpp

#include <iostream>
using namespace std;

int main()
{
	int n;
	cin >> n;
	
	if(50<=n && n<=100)
		//3,5 배수출력
	{
		for(int i=1;i<=n;i++)
		{
			if(i%3==0)
				cout<< i << " ";
		}
		cout<< "\n";
		for(int j=1;j<=n;j++)
		{
			if(j%5==0)
				cout<< j <<" ";
		}
	} else
		cout<< "error";
	
	return 0;

   return 0;
}

Retrieved from http://wiki.zeropage.org/wiki.php/데블스캠프2006/월요일/연습문제/if-else/정승희
last modified 2021-02-07 05:29:03