c# - For loop pattern -
i have assignment college, anyway need make pattern output:
* ** *** **** ***** ****** ******* ******** ********* **********
here's code:
using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; namespace problem_11 { class program { static void main(string[] args) { int i; (i = 1; <= 10; i++) { (string o = "*";); //nested loop { console.write(o); } console.write("\n"); } console.readline(); } } }
error 1 assignment, call, increment, decrement, await, , new object expressions can used statement
error 2 invalid expression term ')'
error 3 invalid expression term '{'
error 4 ) expected
error 5 { expected
try code
for (int = 0; < 10; i++) { (int j = 0; j <=i; j++) { console.write("*"); } console.writeline(); }
Comments
Post a Comment