Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Java multiplication (in the type PrintStream is not applicable for the arguments (String, int))

Table of a any number
getting this error – on System.out.println(number+" x "+i+" = ",+number*i);

(in the type PrintStream is not applicable for the arguments (String, int))

package JAVAS;
import java.util.Scanner;
public class number {

    public static void main(String[] args) {
Scanner num = new Scanner(System.in);
System.out.println("Enter the number ??");
int number = num.nextInt();
int i=1;
System.out.println("the table of the following number is ");
while (i <= 10)
{
    System.out.println(number+" x "+i+" = ",+number*i);
    i++;
}
        
    }
}

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Use System.out.println(number + " x " + i + " = " + number * i);

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading