-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 41ba41e
Showing
7 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# reducepurcent |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |