Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace e
- {
- class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Nombre de photocopie effectuées");
- float nombrePhotocopie = float.Parse(Console.ReadLine());
- float prixTotal;
- if (nombrePhotocopie <= 10)
- {
- prixTotal = nombrePhotocopie * 0.1f;
- }
- else
- {
- if (nombrePhotocopie <= 30)
- {
- prixTotal = 10 * 0.1f + (nombrePhotocopie - 10) * 0.09f;
- }
- else
- {
- prixTotal = 10 * 0.1f + 20 * 0.09f + (nombrePhotocopie - 30) * 0.08f;
- }
- }
- Console.WriteLine("Le prix sera {0} euro",prixTotal);
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement