Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication7
- {
- class Program
- {
- static void Main(string[] args)
- {
- int i = 0;
- bool neg=false;
- bool prolaz1=false;
- bool prolaz2=false;
- bool neparni=false;
- while (i < 6)
- {
- Console.WriteLine("Unesite broj: ");
- int broj=int.Parse(Console.ReadLine());
- if(prolaz1==false)
- {
- if (broj < 0) neg = true; prolaz1 = true;
- }
- if (prolaz2 == false)
- {
- if (broj % 2!=0) neparni = true; prolaz1 = true;
- }
- i++;
- }
- Console.WriteLine("U nizu ima neparnih brojeva: {0}. U nizu ima negativnih brojeva: {1}", neparni, neg);
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement