1.
Console.Write ( Please enter a few lines to print: " ); int a = Convert.ToInt32 ( Console.ReadLine ()); for (int i = 1 ; I <= A; I++ for (int j = 1 ; J <= I; J++ " ☆ "
2.
Console.Write ("Please enter a few lines to print:"); intA =Convert.ToInt32 (Console.ReadLine ()); for(inti =1; I <= A; i++) { for(intj = a-i; J >=0; j--) {Console.Write ("☆"); } Console.WriteLine (); }
3.
Console.Write ("Please enter a few lines to print:"); intA =Convert.ToInt32 (Console.ReadLine ()); for(inti =0; i < A; i++) { for(intj =1; J <= A-(i +1); J + +) {Console.Write (" "); } for(intK =1; K <= i +1; k++) {Console.Write ("☆"); } Console.WriteLine (); }
4.
Console.Write ("Please enter a few lines to print:"); intA =Convert.ToInt32 (Console.ReadLine ()); for(inti =1; I <= A; i++) { for(intj =0; J <= I-2; J + +) {Console.Write (" "); } for(intK =0; K <= A-i; k++) {Console.Write ("☆"); } Console.WriteLine (); }
15-07-03 for () statement-Print Triangle