Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- double[] a = new double[10];
- double[] b = new double[a.Length];
- int i, j, x, f;
- for (i = 0; i < a.Length; i++)
- {
- a[i] = double.Parse(Console.ReadLine());
- }
- for (j = 0; j < a.Length; j++)
- {
- if (j % 2 == 0)
- {
- b[j] = Math.Pow(a[j], 2);
- }
- else
- {
- b[j] = Math.Sqrt(a[j]);
- }
- }
- Console.WriteLine("");
- for (x = 0; x < a.Length; x++)
- {
- Console.Write(a[x] + " ");
- }
- Console.WriteLine("");
- for (f = 0; f < a.Length; f++)
- {
- Console.Write(b[f] + " ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement