1. Write a program that prompts the user to enter an integer and determines whet
ID: 3722453 • Letter: 1
Question
1. Write a program that prompts the user to enter an integer and determines whether it is divisible by 6 and 7, whether it is divisible by 6 or 7, and whether it is divisible by 6 or 7, but not both. For example, if your input is 12, the output should be Is 12 divisible by 6 and 7? false Is 12 divisible by 6or 7? true Is 12 divisible by 6 or 7, but not both? True (Hint: Use the AND , OR ,X_OR operators) 2.Write an Assembly Language program to solve this expression using SPIM software volume = aSidebSidecSide surfaceArea = 2( aSidebSide + aSidecSide + bSidecSide) 3. Write an Assembly Language program to Compute sum of squares from 1 to n 4. Write an Assembly Language program to print the multiplication table of 7 5. Write a program that reads two numbers and checks which is greater.1. Write a program that prompts the user to enter an integer and determines whether it is divisible by 6 and 7, whether it is divisible by 6 or 7, and whether it is divisible by 6 or 7, but not both. For example, if your input is 12, the output should be Is 12 divisible by 6 and 7? false Is 12 divisible by 6or 7? true Is 12 divisible by 6 or 7, but not both? True (Hint: Use the AND , OR ,X_OR operators) 2.Write an Assembly Language program to solve this expression using SPIM software volume = aSidebSidecSide surfaceArea = 2( aSidebSide + aSidecSide + bSidecSide) 3. Write an Assembly Language program to Compute sum of squares from 1 to n 4. Write an Assembly Language program to print the multiplication table of 7 5. Write a program that reads two numbers and checks which is greater.
1. Write a program that prompts the user to enter an integer and determines whether it is divisible by 6 and 7, whether it is divisible by 6 or 7, and whether it is divisible by 6 or 7, but not both. For example, if your input is 12, the output should be Is 12 divisible by 6 and 7? false Is 12 divisible by 6or 7? true Is 12 divisible by 6 or 7, but not both? True (Hint: Use the AND , OR ,X_OR operators) 2.Write an Assembly Language program to solve this expression using SPIM software volume = aSidebSidecSide surfaceArea = 2( aSidebSide + aSidecSide + bSidecSide) 3. Write an Assembly Language program to Compute sum of squares from 1 to n 4. Write an Assembly Language program to print the multiplication table of 7 5. Write a program that reads two numbers and checks which is greater.
1. Write a program that prompts the user to enter an integer and determines whether it is divisible by 6 and 7, whether it is divisible by 6 or 7, and whether it is divisible by 6 or 7, but not both. For example, if your input is 12, the output should be Is 12 divisible by 6 and 7? false Is 12 divisible by 6or 7? true Is 12 divisible by 6 or 7, but not both? True (Hint: Use the AND , OR ,X_OR operators) 2.Write an Assembly Language program to solve this expression using SPIM software volume = aSidebSidecSide surfaceArea = 2( aSidebSide + aSidecSide + bSidecSide) 3. Write an Assembly Language program to Compute sum of squares from 1 to n 4. Write an Assembly Language program to print the multiplication table of 7 5. Write a program that reads two numbers and checks which is greater.
Explanation / Answer
the programming language is not specified so i am writing in java
}
================================
for sum of sqaures assembly language program-
=======================
FOR MULTIPLICATION TABLE
public class Exercise_03_26 { public static void main(String[] args) { Scanner input = new Scanner(System.in); // Create Scanner object // Prompt user to an integer System.out.print("Enter an integer: "); int number = input.nextInt(); // Determine whether it is divisible by 6 and 7 // Display results System.out.println("Is it divisible by 6 and 7? ") ((number % 6 == 0) && (number % 7 == 0))); System.out.println("Is it divisible by 6 or 7? " ) ((number % 6 == 0) || (number % 7 == 0))); System.out.println("Is it divisible by 6 of 7, but not both? " ) ((number % 6 == 0) ^ (number % 7 == 0))); }}
================================
for sum of sqaures assembly language program-
MOV CL, NUM MOV SUM, 00 L: MOV AL, CL MUL AL ADD AL, SUM MOV SUM, AL LOOP L END
=======================
FOR MULTIPLICATION TABLE
.MODEL SMALL .STACK 100H .DATA NL DB 0DH,0AH,'7' .CODE MAIN ENDP END MAIN
============= #include<conio.h> #include<iostream.h> class biggest { int a; void getdata(void); void display_large(biggest,biggest); }; void biggest :: getdata(void) { cout<<" Enter Value :-"; cin>>a; } void largest :: display_biggest(largest a1,largest a2) { if(a1.d > a2.d) cout<<" Object 1 contain Largest Value "<<o1.d; elseif(a2.d > a1.d) cout<<" Object 2 contain Largest Value "<<o2.d; else cout<<" BOTH ARE EQUAL"; } void main() { biggest a1,a2,a3; clrscr(); a1.getdata(); a2.getdata(); a3.display_biggest(a1,a2); getch(); } Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.