Browse Source

Add files via upload

pull/1/head
Rav4s 6 years ago
committed by GitHub
parent
commit
3cbb1f457f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      ProgrammingMB C++/ProgrammingMB.cbp
  2. 4
      ProgrammingMB C++/ProgrammingMB.depend
  3. 10
      ProgrammingMB C++/ProgrammingMB.layout
  4. BIN
      ProgrammingMB C++/bin/Debug/ProgrammingMB.exe
  5. 46
      ProgrammingMB C++/main.cpp
  6. 55
      ProgrammingMB C++/main.cpp.save
  7. BIN
      ProgrammingMB C++/obj/Debug/main.o

40
ProgrammingMB C++/ProgrammingMB.cbp

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="ProgrammingMB" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/ProgrammingMB" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/ProgrammingMB" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-fexceptions" />
</Compiler>
<Unit filename="main.cpp" />
<Extensions>
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>

4
ProgrammingMB C++/ProgrammingMB.depend

@ -0,0 +1,4 @@
# depslib dependency file v1.0
1593806778 source:q:\c++\programmingmb\main.cpp
<iostream>

10
ProgrammingMB C++/ProgrammingMB.layout

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="main.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="871" topLine="28" />
</Cursor>
</File>
</CodeBlocks_layout_file>

BIN
ProgrammingMB C++/bin/Debug/ProgrammingMB.exe

Binary file not shown.

46
ProgrammingMB C++/main.cpp

@ -0,0 +1,46 @@
#include <iostream>
using namespace std;
int convert()
{
double orig;
double converted;
int currency;
cout << "Enter the original amount (USD): ";
cin >> orig;
cout << "Enter the currency to convert to (1 = peso, 2 = rupee, 3 = pound, 4 = euro): ";
cin >> currency;
switch(currency) {
case 1 :
converted = orig * 22.4;
break;
case 2:
converted = orig * 75.69;
break;
case 3:
converted = orig * 0.8;
break;
case 4:
converted = orig * 0.89;
break;
default:
cout << "Invalid value" << endl;
}
cout << "The converted value is: " << converted << endl;
return 1;
}
int main()
{
char cont = 'y';
while(cont == 'y'){
convert();
cout << endl;
cout << "Would you like to continue? Enter y or n: ";
cin >> cont;
}
return 0;
}

55
ProgrammingMB C++/main.cpp.save

@ -0,0 +1,55 @@
#include <iostream>
using namespace std;
int convert()
{
double orig;
double converted;
int currency;
cout << "Enter the original amount (USD): ";
cin >> orig;
cout << "Enter the currency to convert to (1 = peso, 2 = rupee, 3 = pound, 4 = euro): ";
cin >> currency;
switch(currency) {
case 1 :
converted = orig * 22.4;
break;
case 2:
converted = orig * 75.69;
break;
case 3:
converted = orig * 0.8;
break;
case 4:
converted = orig * 0.89;
break;
default:
cout << "Invalid value" << endl;
}
cout << "The converted value is: " << converted << endl;
return 1;
}
int main()
{
bool cont = true;
char contcheck;
while(cont ){
convert();
cout << endl;
cout << "Would you like to continue? Enter y or n: ";
cin >> contcheck;
if(contcheck = 'y'){
cont = true;
} else{
cont = false;
}
}
return 0;
}

BIN
ProgrammingMB C++/obj/Debug/main.o

Binary file not shown.
Loading…
Cancel
Save