AreWe

Untitled

Nov 11th, 2017
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. static void EnterArray(int[] array)
  2. {
  3. for(int i=0; i<array.Length; i++)
  4. {
  5. do
  6. {
  7. Console.Write("\tVuvedete chasovete za den " + (i + 1) + " = ");
  8. array[i] = Convert.ToInt16(Console.ReadLine());
  9. } while (array[i] < 0);
  10. }
  11. }
  12.  
  13. static int WorkDyas(int[] array)
  14. {
  15. int raboteniDni = 0;
  16. for(int i=0; i<array.Length; i++)
  17. {
  18. if (array[i] > 0) raboteniDni++;
  19. }
  20. return raboteniDni;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment