일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- query
- C
- 윈도우즈
- Kafka
- 투자
- WebProgramming
- System
- HTML
- meta
- OOP
- UTF-8
- beans
- windows
- CLASS
- 포인터
- Call-by-reference
- 악성코드
- 노드
- Sort
- 자료구조
- algorithm
- array
- JavaScript
- jsp
- c++
- java
- CSS
- request
- function
- API
Archives
- Today
- Total
hahahia
String Process 본문
<C Base>
bool isalpha(char) - alphabet ?
bool isalnum(char) - alphabet or number ?
bool isupper(char) - capital letter ?
bool islower(char) - small letter ?
char toupper(char) - change to capital letter
char tolower(char) - change to small letter
int atoi(char [])
float atof(char [])
int itoa(int, char [], int radix)
int _itoa(int, char [], int radix)
int _itoa_s(int, char [], size_t bufsize, int radix)
ex) char str[100], str2[100];
itoa(1024, str, 10);
str = “1024”
str = “10000000000”
<C++ Base>
find(“str”) - return value : offset
find(“str”, offset) fail – return : -1
substr(offset, count)
insert(offset, “str”)
replace(offset, count, “str”)
erase(offset, count)
c_str()
/* 들어온 입력이 PUSH면 PUSH를 출력
POP이면 POP을 출력하시오
ex) <In> <Out>
5 PUSH
ABC PUSH
PUSH POP
PUSH
POP
DEF
*/
#include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
string s;
cin >> n;
while(n--)
{
cin >> s;
if(s==string("PUSH"))
cout << s << endl;
else if(s==string("POP"))
cout << s << endl;
}
return 0;
}
Comments