Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace p
- {
- class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Quel est votre age ?");
- int age = int.Parse(Console.ReadLine());
- Console.WriteLine("Etes vous un homme [H] ou une femme [F] ?");
- string genre = Console.ReadLine();
- if (genre == "H" && age >= 20)
- {
- Console.WriteLine("Vous payerez l'impôt");
- }
- else
- {
- if (genre == "F" && (age >= 18 && age <= 35))
- {
- Console.WriteLine("Vous payerez l'impôt");
- }
- else
- {
- Console.WriteLine("Vous ne payerez pas l'impôt");
- }
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement