JAVA PROGRAM
just do whats on the sample run.thanks

// If you have any doubts please comment me
code:-
import java. util.*;
public class Main
{
public static void main(String[] args) {
long a=7,b=11,c=13;
System.out.println("MULTIPLE OF
7-11-13");
String answer
= null;
do { // this is for yes or no loop
try{ // Here we check
the exception handling
Scanner input = new
Scanner(System. in);
System.out.println("Enter an N-Digit number: ");
long number =
input. nextLong();
Scanner inp = new
Scanner( System.in );
if(number%a==0)//check the number is multiple of 7 or not
{
System.out.println("MULTIPLE of -7");
}
if(number%b==0)//
check the number is multiple of 11 or not
{
System.out.println("MULTIPLE of -11");
}
if(number%c==0)//check the number is multi[le of 13 or not
{
System.out.println("MULTIPLE of -13");
}
if(number%a!=0
&& number%b!=0 && number%c!=0 )//check the number
is not multiple of three numbers
{
System.out.println("This number is not multiple of 7-11-13");
}
System.out.println( "press 'y' to try again:" );
answer = inp.nextLine();
} catch (
InputMismatchException ex )
{
System.out.println("Invalid Input"
);//If there is found error it prints invalid...
}
}while(answer.equals("y"));//this while loop for
press 'y' to continue.....
}
}
Output:-
MULTIPLE OF 7-11-13 Enter an N-Digit number: 9001 This number is not multiple of 7-11-13 press 'y' to try again: Enter an N-Digit number: 9100 MULTIPLE of -7 MULTIPLE of -13 press 'y' to try again: Enter an N-Digit number: 9i21 Invalid Input Enter an N-Digit number: 77 MULTIPLE of -7 MULTIPLE of -11 press 'y' to try again:
JAVA PROGRAM just do whats on the sample run.thanks Create a program that will accept positive...
Using Visual Studio 2017 Create This Program Using C# implement source code Program 5: The concept of a 5-digit palindrome number is a 5-digit number that reads the same from left to right and from right to left. For example, 12121, 45454, and 14741 are valid 5-digit palindrome numbers. Design (pseudocode) and implement (source code) a program (name it FiveDigitPalindrom) that reads a 5-digit number from the user (as integer value, not string) and then mathematically (using division and remainder...
You are hired by a college to write a Java program to use a so-called check sum technique for catching typing errors of student ID. The college assigns a seven-digit number to each student. The seventh digit (i.e., the rightmost digit) is determined from the other digits with the use of the following formula: 7th digit = (1 *(1st digit) * 2 * (2nd digit) * ... * 6 * (6th digit)) % 10 Your program should prompt users to...
This is Python
The program should accept input from the user as either 7-digit
phone number or 10-digit. If the user enters 7 characters, the
program should automatically add "512" to the beginning of the
phone number as the default area code. Dash (hyphen) characters do
not count in input character count, but must not be random. If the
user enters dashes the total character count must not exceed
12.
The program should not crash if the user enters invalid...
JAVA:
(15 marks) Write a program that creates an integer array with 50 random values, prompts the user to enter the index of an element in the array between 0 and 49, then displays the corresponding element value. If the specified index is out of bounds, display an error message (e.g. "Out of Bounds") and ask the user to enter another index. Use a while loop that will keep prompting the user until a valid input is received. To handle...
Write a Java program to convert octal (integer) numbers into their decimal number equivalents (exactly the opposite of what you have done in Assignment 4). Make sure that you create a new Project and Java class file for this assignment. Your file should be named “Main.java”. You can read about octal-to-decimal number conversions on wikepedia Assignment 4 is at the bottom Objective Your program should prompt the user to enter a number of no greater than 8 digits. If the...
Write a java program to print all the prime numbers below a certain given number. A prime number is defined as a number that can only be divided by 1 and itself. Requirements: 1. Accept the upper limit from the user as an integer. 2. You can assume the user input will be positive and smaller than INT MAX 3. Go from 1 to the number. If you happen to find a number that is prime, print it. The input...
Write a JAVA program that plays a number guessing game with the user. A sample run for the game follows. User input is shown in boldface in the sample run. Welcome to the game of Guess It! I will choose a number between 1 and 100. You will try to guess that number. If your guess wrong, I will tell you if you guessed too high or too low. You have 6 tries to get the number. OK, I am...
Do pseudocode in java Design (pseudocode) and implement (source code) a program (name it LargestOccurenceCount) that read from the user positive non-zero integer values, finds the largest value, and counts it occurrences. Assume that the input ends with number 0 (as sentinel value to stop the loop). The program should ignore any negative input and should continue to read user inputs until 0 is entered. The program should display the largest value and number of times it appeared as shown...
write a java program
Accept a positive integer n from keyboard and then create an array or arraylist containing n random elements within the range [-n,n). Print out the random array or arraylist, and then find out and print out the number of inversions and the maximum subarray (index range of the maximum subarray along with the maximum subarray sum) in the array or arraylist using divide and conquer, respectively. For example, suppose we accept integer 6 from keyboard, then...
Write a Java program that determines if a person hits the "Pick 3" loterry numbers. Have the program to randomly create a 3 digit lottery number. Have the user enter the number they will be playing and the results: (DO NOT USE ARRAYS or STRINGS) -If the user input matches the lottery number in the exact order, the award is $5Million. -If all the digits in the user input match all the digits in the lottery number, the award is...