Fixed Error:(6, 8) java: class algorithm is public, should be declared in a file named algorithm.java. Inside file PrimeFactorization, the name of public class was wrong.

This commit is contained in:
Maria Lungeanu
2020-05-25 00:21:28 +03:00
parent 63e5ce4c8f
commit a5f42e293b
25 changed files with 293 additions and 238 deletions

View File

@ -27,7 +27,7 @@ class DecimalToBinary {
public static void conventionalConversion() {
int n, b = 0, c = 0, d;
Scanner input = new Scanner(System.in);
System.out.printf("Conventional conversion.\n\tEnter the decimal number: ");
System.out.printf("Conventional conversion.%n Enter the decimal number: ");
n = input.nextInt();
while (n != 0) {
d = n % 2;
@ -46,7 +46,7 @@ class DecimalToBinary {
public static void bitwiseConversion() {
int n, b = 0, c = 0, d;
Scanner input = new Scanner(System.in);
System.out.printf("Bitwise conversion.\n\tEnter the decimal number: ");
System.out.printf("Bitwise conversion.%n Enter the decimal number: ");
n = input.nextInt();
while (n != 0) {
d = (n & 1);