Computer Science, asked by CrazyHatter, 1 year ago

HEYLOOOOO
FIND THE MISTAKES IN THE FOLLOWING TWO PROGRAMS

Attachments:

Answers

Answered by priyanshi616
1
in the first one there is no need of scanner class
but still import java.util is used so Scanner sc=new Scanner (System.in) is missing
in the second one
again the same mistake is there and after the for loop conditions there is a semi colon which will lead to syntax error

siddhartharao77: import java.util.Scanner is used and moreover difference in variable intialization!
priyanshi616: your most welcome
Similar questions