-
C++연습]달러 유료화 환율 변환 프로그램 만들기코딩Coding/C++_연습 2021. 12. 2. 10:22728x90
#include <consio.h> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <string> using namespace std; int main() { double usd; double rate; double euro; rate = 0.88; const int COLMFT1 = 35; const int COLMFT2 = 15; cout << fixed << setprecision(2); cout << "Welcome to C++ Currency Converter" << endl; cout << setw(COLMFT1) << left << "Enter a value (US dollars): "; cin >> usd; cout << endl; cout << setw(COLMFT1) << left << "US dollars: "; cout << setw(COLMFT2) << right << usd << endl; cout << setw(COLMFT1) << left << "Conversion rate(per US dollar): "; cout << setw(COLMFT1) << right << rate << endl; euro = usd * rate; cout << setw(COLMFT1) << left << "Euro : "; cout << setw(COLMFT1) << right << euro << endl; cout << "\n---------------------------------------" << endl; cout << "\n End of Rate Converter" << endl; }
결과
출처 :
https://www.wikihow.com/Write-a-C%2B%2B-Application-that-Converts-Currency
How to Write a C++ Application that Converts Currency
Are you looking for a project to practice your programming skills in C++? This tutorial will show you how to write a C++ program that converts currency. Download Microsoft Visual Studio. Go to visualstudio.microsoft.com and download the...
www.wikihow.com
반응형'코딩Coding > C++_연습' 카테고리의 다른 글
C++연습] C++ Finding Smallest & Largest Integers(C++ While Loop) (0) 2021.12.03 C++연습]두 int를 읽어서 출력하는 while 루프로 이뤄진 프로그램 작성 (0) 2021.12.02 C++연습]대문자 소문자 차례대로 출력 (오른쪽으로 차례대로) (0) 2021.12.02 C++연습] a 97~z122차례대로 출력하기 문자char 알파벳 숫자 출력 (0) 2021.12.02 [C++연습]Calculator계산기 만들기 (0) 2020.12.22 C++연습_숫자 영어로 입력하면 숫자로 출력하기 (0) 2020.12.20 C++연습_숫자를 영어로 출력하기 (0) 2020.12.20 C++연습_내가 입력한 숫자가 홀수(odd)나 짝수(even)인지 구별 하여 출력하기 (0) 2020.12.20