카테고리 없음

std, cout, cin

tonirr 2020. 11. 23. 23:37
  • std::cout
#include<iostream>

int main(){
	std::cout<<"Hello world!";
    return 0;
}

// Hello world!

 

  • std:cin
#include <iostream>

int main(){
	std::cout<<"숫자를 입력하세요: ";
    int x;
    std::cin>> x;
    std::cout<< "다음숫자를 입력했습니다. " << x << std::endl;
    return 0;
}

// 숫자를 입력하세요: 2
// 다음숫자를 입력했습니다. 2