C++ cin cout

자료실

C++ cin cout

소프트웨어과 5 1,257 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;
}
번호 제목 글쓴이 날짜 조회
48 2024년도 한국사능력검정 운영 계획 소프트웨어과 03.12 43
47 javascript 계산기 소프트웨어과 2023.04.20 287
열람중 C++ cin cout 댓글+5 소프트웨어과 2023.03.14 1258
45 이 사이트는 안전하지 않습니다. 소프트웨어과 2023.03.08 372
44 아두이노 RC카 소프트웨어과 2022.06.29 624
43 아두이노-LCD 소프트웨어과 2022.06.09 750
42 아두이노 - NEO LED BT모드 댓글+1 소프트웨어과 2022.06.03 20779
41 아두이노 초음파센서 댓글+2 소프트웨어과 2022.06.02 62468
40 사회봉사 활동 계획서 소프트웨어과 2021.11.05 769
39 학부모동의서(자격증) 소프트웨어과 2021.09.13 836
38 코드론 시뮬레이터 소프트웨어과 2021.07.01 931
37 코드론 미니 - 드라이버 소프트웨어과 2021.07.01 815
36 CSS 메뉴연습 소프트웨어과 2021.05.24 1045
35 응용프로그래밍 화면 구현 책pdf 소프트웨어과 2021.04.23 1418
34 교외체험학습 규정 및 신청서 양식 최고관리자 2021.04.20 826
33 2020 상업경진 경제골든벨 문제지 최고관리자 2021.04.12 1274
32 2020 상업경진 컴퓨터그래픽 문제지 최고관리자 2021.04.12 885
31 2020-시도 비즈니스 프로그래밍 문제지 최고관리자 2021.04.12 930
30 제10회 비즈니스 프로그래밍 문제지(2020) 최고관리자 2021.04.12 831
29 탭메뉴 예제 최고관리자 2021.03.11 1350
Category
반응형 구글광고 등
State
  • 현재 접속자 44 명
  • 오늘 방문자 1,210 명
  • 어제 방문자 1,299 명
  • 최대 방문자 2,863 명
  • 전체 방문자 425,260 명
  • 전체 게시물 6,596 개
  • 전체 댓글수 129 개
  • 전체 회원수 31 명
Facebook Twitter GooglePlus KakaoStory NaverBand