Problème Eclipse!
Résolu
moli.Bym
Messages postés
29
Date d'inscription
Statut
Membre
Dernière intervention
-
moli.Bym Messages postés 29 Date d'inscription Statut Membre Dernière intervention -
moli.Bym Messages postés 29 Date d'inscription Statut Membre Dernière intervention -
A voir également:
- Problème Eclipse!
- Eclipse java - Télécharger - Langages
- Honeywell eclipse ms5145 configuration français - Forum Programmation
- Eclipse temurin jre avec hotspot - Forum Java
- Problème avec douchette honeywell - Forum Matériel & Système
- Désinstaller eclipse - Forum Linux / Unix
public class PremPass {
public static void main(String []args){
String label,operat,op1,op2;
Instruction inst = new Instruction();
System.out.println("entrez le label, S'il n y a pas de label écrivez //");
Scanner sc= new Scanner(System.in);
label=sc.next();
System.out.println("entrez l'opération");
operat=sc.next();
if (operat=="add"){
System.out.println("entrez les opérandes");
op1=sc.next();
op2=sc.next();
inst=new Instruction(label,operat,op1,op2);}
else
if(operat=="stop") {
inst=new Instruction(label,operat);
}
else
if(operat=="copy"||operat=="divise"||operat=="load"||operat=="multi"||operat=="read"||operat=="sub"||operat=="store"||operat=="write"){
System.out.println("entrez l'opérand");
op1=sc.next();
inst=new Instruction(label,ope,op1);
}
System.out.println(inst.label+" "+inst.operat+" "+inst.op1+" "+inst.op2);
}
}