Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace b
- {
- class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Quel est la quantité d'eau envoyée : ");
- double quantiteEau = double.Parse(Console.ReadLine());
- double prixUnitaire = 3.75;
- double prixHT = quantiteEau * prixUnitaire;//prix total HT
- if (prixHT > 1000) //si prix > a 1000 alors pas de frais de ports
- {
- Console.Write("Le prix de la commande sera : " + prixHT + " livraison comprise");
- }
- else //si prix < a 1000 alors frais de ports de 5%
- {
- double prixTTC = Math.Round((prixHT + (0.05 * prixHT)),2);//prix + frais de ports de 5%
- Console.WriteLine("Le prix de la commande sera : " + prixTTC + " livraison comprise");
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement