+ 2
How can we arrange this pattern..??[SOLVED]
Can anyone help me please... I just want to print multiplication table. my code is correct to print those numbers .but , problem is cannot print like square because of double digits .. 🙄 .please help me out from this problem.. suggestions are welcome .. Thank you.. https://code.sololearn.com/cqOTWXL66W4V/?ref=app
8 odpowiedzi
+ 4
// this should give you 'square' output format:
System.out.print(" "+(9<x ? "" : " ")+x);
+ 4
System.out.printf("%3d ",x);
+ 1
"%4d" instead of "%3d"
+ 1
visph done 👍😊
0
JaScript not really: only last line (table of 10) has once 3 digits number, at last position (100), so square is preserved ;P
0
JaScript also, yours should be "%4d" ^^
♡Nani《 King Of Pain 》♡
for JaScript solution you need to use printf instead of print ^^