Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- int antalloner=0;
- string passOnString = "Enter number of salaries: ";
- antalloner = int.Parse(ReadInt(passOnString));
- ProcessSalaries(antalloner);
- }
- static void ProcessSalaries(int numberOfSalaries)
- {
- int[] salaries = new int[numberOfSalaries];
- for (int i = 0; i < salaries.Length; i++)
- {
- string passOnString = "Enter salery " + (i+1) ": ";
- salaries[i] = int.Parse(passOnString);
- }
- }
- static string ReadInt(string passOnString)
- {
- string input;
- Console.Write(passOnString);
- input = Console.ReadLine();
- return input;
- }
Add Comment
Please, Sign In to add comment