Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- String[] q = {"yes", "no", "maybe", "don’t know", "шо", "who knows"}; int c = 0;
- for (int i = 0; i < q.length; i++) {
- System.out.print(q[i] + " ");
- }
- System.out.println();
- while (c < q.length) {
- System.out.print(q[c] + " ");
- c++;
- }
- System.out.println();
- c = 0;
- for (String i : q) {
- System.out.print(i + " ");
- }
- System.out.println();
- do {
- System.out.print(q[c] + " ");
- c++;
- } while (c < q.length);
- }
- }
Add Comment
Please, Sign In to add comment