Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Assignment # 1 Print the pattern given below using single printf statement

XX XX
XX XX
XX XX
X X
X X
XX XX
XX XX
XX XX


Assignment # 2 Print the pattern given below using single printf statement
(please do NOT use the string function below)
0
909
89098
7890987
678909876
56789098765
4567890987654
345678909876543
23456789098765432
1234567890987654321
Posted
Comments
ZurdoDev 26-Mar-13 8:24am    
Since this is a homework question, where are you stuck?
lav kumar singh 26-Mar-13 8:33am    
YA U R RIGHT BUT
i cant able to print without string function if u have ans let me know .........

1 solution

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

But first, work out what language you are trying to use: C# does not have a "printf" method - you are probably looking as C instead.

Hint: Look at the effect of the '\n' character on printed output.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900