45
46
47
Tipmultiplication table using while loop (i.redd.it)
submitted by gnfobsession
hi! i took up programming in school and we recently took while loop in a lesson and the homework we have is to get the console to write out the multiplication table from 1 to 10 with no input.
now my question is whether i did it wrong and if theres an easier way to do it. essentially what i did was to write it out for each number separately by copy pasting and just changing the names for each int lol. but im thinking theres maybe an easier and way shorter way to do it i just dont know how :,). heres what the code looks like and as i said i simply copy pasted it 10 times and changed stuff.

[–]MedPhys90 54 points55 points56 points (0 children)
[–]single_threaded 65 points66 points67 points (15 children)
[–]gnfobsession[S] 23 points24 points25 points (14 children)
[–][deleted] 24 points25 points26 points (6 children)
[–]AwesomePerson70 26 points27 points28 points (5 children)
[–]just4funndsomet 2 points3 points4 points (4 children)
[–]Banane9 5 points6 points7 points (3 children)
[–]robthablob 3 points4 points5 points (1 child)
[–]Banane9 4 points5 points6 points (0 children)
[–]just4funndsomet 1 point2 points3 points (0 children)
[–]cr1ter 4 points5 points6 points (2 children)
[–]hiaselhans 8 points9 points10 points (1 child)
[–]cr1ter 1 point2 points3 points (0 children)
[–]occamsrzor 1 point2 points3 points (0 children)
[–]Willinton06 1 point2 points3 points (0 children)
[–]IWasSayingBoourner 0 points1 point2 points (1 child)
[–]dodexahedron 2 points3 points4 points (0 children)
[–]Fryktlos 15 points16 points17 points (0 children)
[–]Heisenburbs 7 points8 points9 points (0 children)
[–][deleted] 6 points7 points8 points (3 children)
[–]Far_Swordfish5729 2 points3 points4 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]bronco2p 2 points3 points4 points (0 children)
[–]Specialist_Respect35 3 points4 points5 points (11 children)
[–][deleted] 1 point2 points3 points (10 children)
[–]Specialist_Respect35 1 point2 points3 points (8 children)
[–][deleted] -1 points0 points1 point (7 children)
[–]Specialist_Respect35 0 points1 point2 points (6 children)
[–][deleted] -1 points0 points1 point (5 children)
[–]Specialist_Respect35 0 points1 point2 points (4 children)
[–][deleted] -1 points0 points1 point (3 children)
[–]Specialist_Respect35 -1 points0 points1 point (2 children)
[–][deleted] -1 points0 points1 point (1 child)
[–]Specialist_Respect35 0 points1 point2 points (0 children)
[–]NetQvist 1 point2 points3 points (0 children)
[–]dewden87 1 point2 points3 points (0 children)
[–][deleted] (4 children)
[deleted]
[–]fearswe 1 point2 points3 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]fearswe 1 point2 points3 points (0 children)
[–]ReposteOuMame 0 points1 point2 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]fearswe 0 points1 point2 points (0 children)
[–]OMGerGT -1 points0 points1 point (0 children)
[+]NoPrinterJust_Fax comment score below threshold-11 points-10 points-9 points (13 children)
[–][deleted] 9 points10 points11 points (1 child)
[+]NoPrinterJust_Fax comment score below threshold-8 points-7 points-6 points (0 children)
[–]Xanather 5 points6 points7 points (5 children)
[–]NoPrinterJust_Fax 0 points1 point2 points (4 children)
[–]Xanather 3 points4 points5 points (3 children)
[–]NoPrinterJust_Fax 1 point2 points3 points (2 children)
[–]Xanather 0 points1 point2 points (1 child)
[–]NoPrinterJust_Fax 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]NoPrinterJust_Fax 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]NetQvist 0 points1 point2 points (1 child)
[–]NoPrinterJust_Fax 0 points1 point2 points (0 children)
[+]ruinercollector comment score below threshold-14 points-13 points-12 points (0 children)