Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
delta-whiplash committed Oct 22, 2020
0 parents commit 41ba41e
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# reducepurcent
Binary file added bin/Debug/reduction
Binary file not shown.
39 changes: 39 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#include <iostream>

using namespace std;

int givemenewprice()
{
float baseprice;
float reductionrate;
float price2pay;
char newvar;
cout << "Quel est le prix de base ? ";
cin >> baseprice;
cout << "Quel est le taux de reduction ? ";
cin >> reductionrate;
price2pay = baseprice*(reductionrate/100);
price2pay = baseprice-price2pay;
cout << "Vous devrez payer : " << price2pay << "Euros" << endl;
cout << "Voulez Vous calculer une autre réduction ? (O/n) ";
cin >> newvar;
if (newvar == 'O' || newvar == 'o') {
givemenewprice();
}
else if (newvar == 'N' || newvar == 'n') {
cout << "Ok, merci et bonne journée";
exit(0);
}
else {
cout << "Je n'est pas compris";
exit(1);
}
return 0;
}

int main()
{
cout << "Copyright, DeltaWhiplash" << endl;
cout << "Bonjour, Bienvenue sur le programme qui calcul vos réduction" << endl;
givemenewprice();
}
Binary file added obj/Debug/main.o
Binary file not shown.
38 changes: 38 additions & 0 deletions reduction.cbp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="reduction" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/reduction" 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/reduction" 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 />
</Project>
</CodeBlocks_project_file>
4 changes: 4 additions & 0 deletions reduction.depend
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# depslib dependency file v1.0
1603359352 source:/home/delta/Documents/scripts/reduction/reduction/main.cpp
<iostream>

10 changes: 10 additions & 0 deletions reduction.layout
Original file line number Diff line number Diff line change
@@ -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="0" topLine="2" />
</Cursor>
</File>
</CodeBlocks_layout_file>

0 comments on commit 41ba41e

Please sign in to comment.