WRITE THE FOLLOWING PROGRAM IN HIGH LEVEL ASSEMBLY LANGUAGE (HLA)
import java.util.*;
class HelloWorld {
public static void main(String[] args) {
boolean flag=true;
int count = 0;
Scanner sc=new Scanner(System.in);
do{
System.out.print("Gimme a number: ");
int num=sc.nextInt();
if (num%10 ==0){
System.out.println("It ends with 0.\nKeep going\n");
count++;
}
else if (num%10 ==3){
System.out.println("It ends with 3.\nKeep going\n");
count++;
}
else{
flag=false;
System.out.print("Sorry Charlie. You loose the game.");
}
if(count==3){
System.out.print("You win the game.");
break;
}
}while(flag==true);
}
}
Step by stepSolved in 2 steps
- There are a variety of approaches to evaluate and contrast various back-end compiler architectures.arrow_forwardWhy shouldn't assembly language be used for creating general-purpose programs? Do you believe there are any circumstances in which assembly language should be used?arrow_forwardWrite a short program that demonstrates the use of MOV instruction in assembly language?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education