+ 1
Write a program to generate the following output using only 1 printf() function.
Output; 1 2 3 4 5 6 7 8 9 My attempt: int main() { printf("|1 2 3|\n|4 5 6|\n|7 8 9"); return 0; }
6 ответов
+ 2
Usually will be needed an attempt with a question.
In addition I would like to recommend first to work with the tutorial.
+ 2
You sure this is C# and not C? Please recheck your language. Also, show your attempt first
By the way, this can be done by using some newlines(\n), tabs (\t) and some numbers inside a single printf () function. All the best =)
+ 2
Giggling_ddl. Then tag the right programming language. You tagged C#. In case you didn't know, C# is another programming language. So change your tag
Also, where's your attempt?
+ 2
Giggling_ddl. You're close! Remove those '|'s and add tabs instead of spaces. It'll be like below code snippet
printf("1\t2\t3\n4\t5\t6\n7\t8\t9");
All the best =)
+ 1
It is C programming!
+ 1
Thank you 🙏