My C++ teacher asked me to write this console project two weeks ago, I'm still trying but I couldn't write the program and I have just one week left. So I need your help with this, any help will be appreciated.
As you can see at the image above, my teacher asks for a digit extracting program. Sounds easy, right? Yeah, he asked for the same assignment before and I wrote that program. But this time he has strange conditions for the program so I need more experienced coders's help.
My teacher said:
-It needs to work up to 19 digits.
-You need to use 10 semicolons maximum.
-You need to use 3 variables maximum.
-You need to use these ONLY: iostream.h, conio.h, if, getch.
-You MUST NOT use these: for, while, do-while, goto, switch, until, repeat-until, try-catch etc.
Or I'll get an F. Ain't that a bitch?
I've made a digit extraction homework just like the image above only with "if" command. I have used 14 semicolons in total and it supported up to 5 digits. My teacher said he wants 10 semicolons max and 19 digit support or I'll get an F. I tried a lot but couldn't make an application with less semicolons.
Some of you will say this is not the right way to teach C++, and If I want to learn it I need to write this myself. Yeah, you are right and this is not the best way to teach C++. I am aware of it and I want to learn java actually but this is my exam project and If I don't complete it, I will get an F and I won't get any java courses. So I need your help. I know this program is very stupid but I have to finish it.
-My teacher said that he used if within an if and wrote it with 7 semicolons in total.
-my classmate said that he found a command and wrote this program with just one variable and 7 semicolons but he doesn't tell me what it is, lol. Screw him.
I hope you guys can help me with that. I'm looking forward to it. Thanks!