일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- Kafka
- 노드
- API
- c++
- 자료구조
- 투자
- CSS
- Call-by-reference
- UTF-8
- Sort
- jsp
- array
- OOP
- System
- CLASS
- C
- 포인터
- algorithm
- function
- WebProgramming
- java
- HTML
- query
- JavaScript
- 윈도우즈
- windows
- meta
- 악성코드
- request
- beans
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