This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 24th, 2012  |  syntax: None  |  size: 1.05 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             int people = 0;
  13.             int passengers = 0;
  14.             double drivers = 0;
  15.  
  16.             Console.Write("Enter the number of the passenger: ");
  17.             passengers = int.Parse(Console.ReadLine());
  18.             drivers = passengers / 5;
  19.             drivers = Math.Ceiling(drivers);
  20.             Console.Write(drivers); // פה זה אמור להדפיס לי 2 בהנחה שמספר הנוסעים הוא 8 וזה מדפיס 1 !
  21.             people = passengers + (int)drivers;
  22.  
  23.             if (people % 6 == 0)
  24.             {
  25.                 Console.WriteLine("You should order: " + people / 6 + " taxies.");
  26.             }
  27.  
  28.             else if (people % 6 != 0)
  29.             {
  30.                 people = ((people / 6) + 1);
  31.                 Console.WriteLine("You should order: " + people + " taxies.");
  32.             }
  33.  
  34.         }
  35.     }
  36. }
clone this paste RAW Paste Data