小编use*_*402的帖子

JAVA:在 Do While 中使用字符串进行决策

import java.util.Scanner;
import java.util.*;

public class MultipicationTable{

    public static void main(String[] args)
    {
        // Initialising selection variable to 0 
        int selection = 0;
        int MultiValue = 0;
        int UserValue = 0;

        // Initializing the count for loop
        int i;


        // Initializing Random1 and Random2 to get random values
        int Random1;
        int Random2;


        // Creating new Scanner
        Scanner input = new Scanner(System.in);

        do{

        // Menu to select type of multipication
        System.out.println("Please select your option");
        System.out.println("1: Random Multipication table");
        System.out.println("2: Give your …
Run Code Online (Sandbox Code Playgroud)

java do-while

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

do-while ×1

java ×1