Advertisement
AvengersAssemble

תרגיל 6

Sep 1st, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.29 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("Please specify age:");
  14.             double age = double.Parse(Console.ReadLine());
  15.             Console.WriteLine("Please specify salary");
  16.             double salary = double.Parse(Console.ReadLine());
  17.             Console.WriteLine("Please specify grades average");
  18.             double avg = double.Parse(Console.ReadLine());
  19.             if((age<30 && age>20) || (salary<2000) || (avg>85 || avg==85))
  20.             {
  21.                 Console.WriteLine("Congratulations! You have successfully met the requirments for the scholarship!");
  22.                 if(age<30 && age>20)
  23.                     Console.WriteLine("Your age is a perfect match!");
  24.                 if (salary < 2000)
  25.                     Console.WriteLine("Your salary matches the required amount!");
  26.                 if(avg>85 || avg==85)
  27.                     Console.WriteLine("Your grades are great!");
  28.             }
  29.             else
  30.             {
  31.                 Console.WriteLine("Sorry, but you do not meet the requirements for the scholarship");
  32.             }
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement