So what does your homework asignment have to do with converting cout to printf()?
You will need to extract each digit of the number and then print only that digit. The mod operator % and divide / will help you do that. The mod operator returns the remainder after division, so if the number is 1234 then 1234 % 10 will give you the 4. Next divide 1234 by 10 to make the number ready to retrieve the nedxt digit -- 3. Repeat that process in a loop until all digits have been extracted and printed.
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...