Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- int[] arr = { 1, 2, 3, -4, 5, 6, 7, 8, 9, 10 };
- Change(arr);
- Console.ReadKey();
- }
- public static void Change(int[] array)
- {
- int sign = array[0];
- int a = -1;
- for (int i = 0; i < array.Length; i++)
- {
- if (array[i] > 0)
- {
- Console.WriteLine(a * array[i]);
- }
- else
- {
- Console.WriteLine(a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement