| Task: | Merkkijono |
| Sender: | user2874 |
| Submission time: | 2021-10-12 09:07:32 +0300 |
| Language: | Java |
| Status: | COMPILE ERROR |
Compiler report
input/Main.java:6: error: cannot find symbol
String eka = a;
^
symbol: variable a
location: class Main
input/Main.java:8: error: incompatible types: int cannot be converted to boolean
if(apu = 1){
^
input/Main.java:11: error: incompatible types: int cannot be converted to boolean
if(apu = 2){
^
input/Main.java:14: error: incompatible types: int cannot be converted to boolean
if(apu = 3){
^
input/Main.java:17: error: incompatible types: int cannot be converted to boolean
if(apu = 4){
^
input/Main.java:20: error: incompatible types: int cannot be converted to boolean
if(apu = 5){
^
input/Main.java:23: error: incompatible types:...Code
import java.util.Scanner;
public class Main {
public static void main (String [] args){
Scanner lukija = new Scanner(System.in);
int apu = Integer.valueOf(lukija.nextLine());
String eka = a;
while(apu>1){
if(apu = 1){
eka = "b" + eka + "b";
}
if(apu = 2){
eka = "c" + eka + "c";
}
if(apu = 3){
eka = "d" + eka + "d";
}
if(apu = 4){
eka = "e" + eka + "e";
}
if(apu = 5){
eka = "f" + eka + "f";
}
if(apu = 6){
eka = "g" + eka + "g";
}
if(apu = 7){
eka = "h" + eka + "h";
}
apu--;
}
System.out.println(eka);
}
}