Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Shavit Borisov
- // CW
- import java.util.Scanner;
- public class TwentyNumbersV1 {
- public static void main(String[] args)
- {
- Scanner in = new Scanner (System.in);
- int num, sum;
- System.out.println("Enter 20 numbers:");
- for(int i=0; i<20; i++)
- {
- num = in.nextInt();
- sum = num%10 + num/10;
- System.out.printf("%d ", sum);
- }
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement