Java:
import java.util.Scanner;
public class ilia {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("How can i help you?");
String eingabe = sc.next();
if(eingabe == "How are you?"); {
System.out.println("Im good what about you?");
}
if(eingabe == "How was your day?"); {
System.out.println("Mine was good what about yours?");
}
if(eingabe == "What time is it?"); {
System.out.println("I dont know go look yourself");
}
if(eingabe == "Can you see me?"); {
System.out.println("Yeah i can see you trough your cameras");
}
if(eingabe == "How old are you?"); {
System.out.println("I am 666 years old");
}
if(eingabe == "Where are you from?"); {
System.out.println("You dont want to know that");
}
if(eingabe == "Can you play music?"); {
System.out.println("Of course what you wanna hear");
}
if(eingabe == "Whats your name?"); {
System.out.println("I dont have a name. I was made before the time started");
}
Wenn ich eine Eingabe mache dann kommen alle antworten auf einmal und das würde ich gerne ändern
freue mich über eure antworten
LG ilias
ps: ist für privaten gebrauch und ja ich programmiere noch nicht so lange
Zuletzt bearbeitet von einem Moderator: