1번째문제
~cpp
#include <iostream>
using namespace std;
void main(){
int number;
cin >> number;
if(number >= 50 && number <= 100){
cout << "3의배수" << endl;
for(int i = 1; i < number; i++){
if(i%3==0){
cout<<" "<<i;
}
}
cout << endl;
cout << "5d의배수"<<endl;
for(i=1;i<number;i++){
if(i%5==0){
cout<<" "<<i;
}
}
cout<<endl;
}
else{
cout << "error" << endl;
}
}
2
~cpp
#include <iostream>
using namespace std;
void main(){
char mun;
cin >> mun;
if(mun >= 65 && mun <= 90 || mun>=97 && mun <= 122){
cout << "영문자" << endl;
}
else if(mun >= 48 && mun <= 57){
cout << "숫자" << endl;
}
else{
cout << "특수문자" << endl;
}
}