AreWe

Untitled

Nov 11th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. static void EnterArray(int[] array)
  2. {
  3. Console.WriteLine("Начало на въвеждане:");
  4. for(int i=0; i<array.Length; i++)
  5. {
  6. do
  7. {
  8. Console.Write("\tВъведете часовете за ден(" + (i + 1) + "): ");
  9. array[i] = Convert.ToInt16(Console.ReadLine());
  10. } while (array[i] < 0);
  11. }
  12. Console.WriteLine("Край на въвеждане!");
  13. }
  14.  
  15. static int WorkDyas(int[] array)
  16. {
  17. int raboteniDni = 0;
  18. for(int i=0; i<array.Length; i++)
  19. {
  20. if (array[i] > 0) raboteniDni++;
  21. }
  22. return raboteniDni;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment