static void Main() { double theta; //угол в радианах for (theta = 0.1; theta <= 1.0; theta = theta + 0.1) { Console.WriteLine("Синус угла {0} равен {1}", theta, Math.Round(Math.Sin(theta),2)); Console.WriteLine("Косинус угла {0} равен {1}", theta, Math.Round(Math.Cos(theta),2)); Console.WriteLine("Тангенс угла {0} равен {1}", theta, Math.Round(Math.Tan(theta),2)); } } Hello, dear. From above, the code calculates the sine cosine and the tangent of theta. The following answer is displayed on the console (approximately):
Sinus....
Cosine...
Tangent...
Sinus....
Cosine....
Tangent....
...........
And I need an answer like:
Sinus....
Sinus....
Sinus....
.......
Cosine....
cosine....
Cosine....
.......
Tangent....
Tangent....
Tangent....
.......
I can use the for function two more times, but it seems to me that this is not correct. Any idea how to do this without Nuba copies? I think the language has methods to use the function several times without unnecessary scribbling! But I do not know! I will be glad to any answers!