U E D R , A S I H C RSS

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

No older revisions available

No older revisions available



데블스캠프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;
}

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:03
Processing time 0.0252 sec