C++ cin cout

자료실

C++ cin cout

소프트웨어과 5 10,556 2023.03.14 14:07

#include<iostream>

#include<string>


using namespace std;


int main()

{

string str1, str2, str3;

cout << "주어: ";

cin >>  str1;

cout << "동사: ";

cin >>  str2;

cout << "목적어: ";

cin >>  str3;

 cout << str1 <<" " << str2 << " a " << str3; 

 return 0;

}

Comments

소프트웨어과 2023.03.17 15:23
#include<iostream>
#include<string>

using namespace std;

int main()
{
int H=0, M=0, S=0;
cout << "시: ";
cin >>  H;
cout << "분: ";
cin >>  M;
cout << "초: ";
cin >>  S;
  cout <<  "\n전체 초: " << ((H * 3600)+(M * 60)+ S);
  return 0;
}
소프트웨어과 2023.03.14 16:41
#include<iostream>
#include<string>
#include<math.h>

using namespace std;

int main()
{
const float py=3.3058;
float M=0;
cout << "평: ";
cin >>  M;
  cout << "평방미터:  " << M*py;
    return 0;
}
소프트웨어과 2023.03.14 16:32
#include<iostream>
#include<string>
#include<math.h>

using namespace std;

int main()
{
int L=0, W=0, H=0;
cout << "길이: ";
cin >>  L;
cout << "너비: ";
cin >>  W;
cout << "높이: ";
cin >>  H;

  cout <<  "\n상자의 부피:  " << L*W*H;
  cout <<  "\n상자의 표면적:  " << 2*((L*W)+(L*H)+(H*W));
return 0;
}
소프트웨어과 2023.03.14 16:25
#include<iostream>
#include<string>
#include<math.h>

using namespace std;

int main()
{
int a=0, b=0;
cout << "첫 번째 변: ";
cin >>  a;
cout << "두 번째 변: ";
cin >>  b;
  cout <<  "\n빗변 길이: " << sqrt(pow(a,2)+pow(b,2));
  return 0;
}
소프트웨어과 2023.03.14 14:14
#include<iostream>
#include<string>

using namespace std;

int main()
{
int age;
cout << "나이: ";
cin >>  age;
age +=10;
  cout <<  "10년 후에는 " << age <<"살이 됩니다. ";
  return 0;
}
번호 제목 글쓴이 날짜 조회
51 ❤️ ✅NEW S+급 여대생✅전원 20대☪️한국 매니저✴️HD100% 실 사☪️S클래스 라인업✴️극강 마인드… 코스프레 07.12 69
50 핸드이노 자료 소프트웨어과 06.12 333
49 관동중 행사음원 소프트웨어과 05.30 283
48 2024년도 한국사능력검정 운영 계획 소프트웨어과 03.12 350
47 javascript 계산기 소프트웨어과 2023.04.20 833
열람중 C++ cin cout 댓글+5 소프트웨어과 2023.03.14 10557
45 이 사이트는 안전하지 않습니다. 소프트웨어과 2023.03.08 746
44 아두이노 RC카 소프트웨어과 2022.06.29 949
43 아두이노-LCD 소프트웨어과 2022.06.09 1046
42 아두이노 - NEO LED BT모드 댓글+1 소프트웨어과 2022.06.03 21508
41 아두이노 초음파센서 댓글+2 소프트웨어과 2022.06.02 63975
40 사회봉사 활동 계획서 소프트웨어과 2021.11.05 1085
39 학부모동의서(자격증) 소프트웨어과 2021.09.13 1166
38 코드론 시뮬레이터 소프트웨어과 2021.07.01 1261
37 코드론 미니 - 드라이버 소프트웨어과 2021.07.01 1168
36 CSS 메뉴연습 소프트웨어과 2021.05.24 1714
35 응용프로그래밍 화면 구현 책pdf 소프트웨어과 2021.04.23 1920
34 교외체험학습 규정 및 신청서 양식 최고관리자 2021.04.20 1166
33 2020 상업경진 경제골든벨 문제지 최고관리자 2021.04.12 1646
32 2020 상업경진 컴퓨터그래픽 문제지 최고관리자 2021.04.12 1212
Category
반응형 구글광고 등
State
  • 현재 접속자 100 명
  • 오늘 방문자 2,094 명
  • 어제 방문자 3,583 명
  • 최대 방문자 4,836 명
  • 전체 방문자 805,130 명
  • 전체 게시물 7,092 개
  • 전체 댓글수 145 개
  • 전체 회원수 32 명
Facebook Twitter GooglePlus KakaoStory NaverBand