2. (Checking SSN) Write a program that prompts the user to enter a social security number in the format DDD-DD-DDDD, where D is a digit. The program displays "Valid SSN" for a correct social security number and "Invalid SSN" otherwise.
Q: ACTIVITY 9.5.5: Arrange the code to read one line of input at a time and then scan the line with…
A: import java.util.Scanner; public class StudentGrades{ public static void process (String name,…
Q: Use the method of disksirings to determine the volume of the solid obtained by rotating the region…
A: The solution is given below for the above given question:
Q: 1. Create a program is used to store and access "id, name and percentage" for 3 students. Sample…
A: Find Your CODE BELOW
Q: Define the rule echo(LST0, LST1). This rule describes LST1, which holds all the same elements as…
A: - PROLOG is an acronym of Programming in Logic. Prolog programming is a sequence of rules and facts.…
Q: Create a function that takes the age in years and returns the age in days. Examples calcAge (65) →…
A: The code is given below:
Q: Form1 should accept weight and height values and return body mass index. The body mass index formula…
A: C# CODE :- using System; namespace string[] values = Console.ReadLine().Split(' ');int w =…
Q: java program using jsp
A: Introduction : JSP technology is used to create web application just like Servlet technology. It can…
Q: What are the different types of errors in PHP?
A: Step 1 The answer is given in the below step
Q: Using methods and arrays, write a program that • Creates and fills an array A of size 50 filled with…
A: The program is implemented in java with structured approach. To run this program in Dr. java please…
Q: Consider account Types 1. Saving Account 2. Current Account Account name, cnicNumber, accountNumber,…
A: Program Approach: Create a class Declare variables to store values entered by user. Create methods…
Q: 4) In each below, a segment of Java code is given. Draw a picture that shows the final result of the…
A: Linked List: A linked list is a linear data structure that is basically a collection of nodes. These…
Q: Write a program that uses three ArrayLists of (x, y) co-ordinates of 1000 entries each. You code…
A: function checkRightAngled (X1, Y1, X2, Y2, X3, Y3) { // Calculate the sides var A = Math.pow(X2 -…
Q: 2. Create a program is used to store and access "id, name and percentage" for n students. Structure…
A: logic:- declare structure student with variables id, name and percent. declare countPass=0,…
Q: Generators Hailstone: Douglas Hofstadter's Pulitzer-prize-winning book, Gödel, Escher, Bach, poses…
A: Write a python code for follwoing1. Pick a positive integer n as the start.2. If n is even, divide…
Q: Class Products extends CI Controller { } public function search ($product) { $list =…
A: According to the question , we have to change the PHP code according to given criteria. In first…
Q: 1. Define a function, attendanceCheck, that accepts a string parameter corresponding to a day of the…
A: Solution: Implementation of checkAttendance(): function attendanceCheck(day){ var people…
Q: Bookshelf Lili and Bibi has just graduated from highschool. They're now in the same university. As…
A: PROGRAMMING APPROACH: // define header file. // Using Struct to store book detail. // Define…
Q: Write a Java program to input a single dimensional integer array of size 8. Pass the array to a…
A: Java code for above : import java.util.Scanner; class Prog{ public static void display(int []…
Q: Write a complete java program called Marks. Which will do the following tasks: 1- This program…
A: import java.util.*;public class Main{ public static void main(String[] args) { int course;…
Q: Implement a C# WinForms application that tracks student names, university id, major, phone numbers,…
A:
Q: Create a function that determines whether a string is a valid hex code. A hex code must begin with a…
A: In this problem, we need to design the code to print the valid hex code with length 6. Input - hex…
Q: B1. Write a selection statement (NOT a complete program) to determine the weather condition based on…
A: if condition in Java is a conditional branch statement, which can be used to route program execution…
Q: Pricing conditions are given for a flight ticket. Draw a flowchart of an algorithm to calculate…
A: Required:
Q: Explain in details about the difference between GET and POST in PHP application?
A: Find the difference between GET and POST given as below:
Q: Write short notes on PHP and MySQL
A: PHP PHP is a server side scripting language that is used to develop static or dynamic websites or…
Q: Python program to find the most common element of a given list.
A: Find out the most common element of the list given to us , have to write a program in python
Q: Predefined Function: ceil(), floor(), rand(), srand() 1. Create a program that will round off a…
A: C Program for above : #include <stdio.h> #include <math.h> int main() { //get…
Q: Write a method to count all words in a string and print the most repeated word. Test Data: Input a…
A: Php code for find total word and most of time repeated word.
in php
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- 5. (Algebra: solve 2 X 2 linear equations) You can use Cramer's rule to solve the following 2 X 2 system of linear equation: ax + by = e cx + dy = f ● x = ed - bf bc ad y = af - ec ad bc - Write a program that prompts the user to enter a, b, c, d, e, and f and display the result. If ad- bc is 0, report that The equation has no solution. Enter a, b, c, d, e, f: 9.0, 4.0, 3.0, -5.0, -6.0, -21.0 Enter x is -2.0 and y is 3.0 Enter a, b, c, d, e, f: 1.0, 2.0, 2.0, 4.0, 4.0, 5.0 Enter The equation has no solutionUse C# (:Write an app that reads in a 5 digit number and determines if it is a palindrome. A palindrome is a number that reads the same backward as it does forward, for instance: 12321, 44444 or 22722. If the number inputted is not 5 digits long, display an error message and allow the user to input another number.(Phone key pads) The international standard letter/number mapping found on the telephone is shown below: 100 2 abc 3 def 4 ghi 5 ikl 6mno 7pgrs 8 tuv 9wxyz Write a program that prompts the user to enter a letter and displays its correspond- ing number.
- Q5. (Find the second lowest interger number) Write a program that prompts the user to enter a set of integer numbers, and finally displays the second lowest integer number in the set. To exit from the program enter -1. Here is a sample run Enter a set of integer numbers: 3 57 928-1 The second lowest number is 3.(Financials: currency exchange) Write a program that prompts the user to enter the exchange rate from currency in U.S. dollars to Rupees PKR. Prompt the user to enter 0 to convert from U.S. dollars to Rupees PKR and 1 to convert from Rupees PKR and U.S. dollars. Prompt the user to enter the amount in U.S. dollars or Rupees PKR to convert it to Rupees PKR or U.S. dollars, respectively. Use c++ program.4. Write a program to perform addition, subtraction, multiplication and division of given two numbers using switch statement. 5.(Digits of an Integer) Write a C# Program that inputs one number consisting of five digits from the user, separates the number into its individual digits and displays the digits separated from one another by three spaces each. For example, if the user types in the number 42339, the app should display
- (java programming language) Write a Java program to do the following task: Assign your id number (example.. 2014299123) to an integer variable id_num Using reminder operator % on the id_num get the last 5 digits (99123) and store it in num If the num is between 0 and 30,000 (both included), display “You are in Group 1” Otherwise if the num is between 30001 and 60,000 (both included), display “You are in Group 2” Otherwise (num is between 60,001 and 99,999 (both included), display “You are in Group 3” Save your file as Q2.Java(Target-Heart-Rate Calculator) While exercising, you can use a heart-rate monitor to see thatyour heart rate stays within a safe range suggested by your trainers and doctors. According to the American Heart Association (AHA) (www.americanheart.org/presenter.jhtml?identifier=4736), theformula for calculating your maximum heart rate in beats per minute is 220 minus your age in years.Your target heart rate is a range that is 50–85% of your maximum heart rate. [Note: These formulas areestimates provided by the AHA. Maximum and target heart rates may vary based on the health, fitness andgender of the individual. Always consult a physician or qualified health care professional before beginning ormodifying an exercise program.] Create a class called HeartRates. The class attributes should include theperson’s first name, last name and date of birth (consisting of separate attributes for the month, dayand year of birth). Your class should have a constructor that receives this data as…(Bar-Chart Printing Program) One interesting application of computers is drawing graphsand bar charts. Write a program that reads five numbers (each between 1 and 30). For each numberread, your program should print a line containing that number of adjacent asterisks. For example,if your program reads the number seven, it should print *******.
- (Financial: credit card number validation) Credit card numbers follow certain pat- terns. A credit card number must have between 13 and 16 digits. It must start with: 4 for Visa cards 5 for Master cards 37 for American Express cards 6 for Discover cards In 1954, Hans Luhn of IBM proposed an algorithm for validating credit card numbers. The algorithm is useful to determine whether a card number is entered correctly or whether a credit card is scanned correctly by a scanner. Credit card numbers are generated following this validity check, commonly known as the Luhn check or the Mod 10 check, which can be described as follows (for illustra- tion, consider the card number 4388576018402626): 1. Double every second digit from right to left. If doubling of a digit results in a two-digit number, add up the two digits to get a single-digit number. 4388576018402626 → 2 * 2 = 4 → 2 * 2 = 4 → 4 * 2 = 8 → 1 * 2 = 2 6 * 2 = 12 (1+ 2 = 3) → 5 * 2 = 10 (1+ 0 = 1) → 8 * 2 = 16 (1 + 6 = 7) → 4 * 2 = 8(IN C LANGUAGE) Binary-Decimal / Decimal Binary . Between 0 and 255 a number will be decided randomly by computer. Then asks to user 3 times a random digit of binary value of the that number. If user enters wrong number for a digit program will select another random number and ask random times random digit. For example: Computer selected number as 163 ( Which is 10100011) What is the digit 2 (question 1/3) :User enter 1 CorrectWhat is the digit 4 (question 2/3) : User enter 0 CorrectWhat is the digit 7 (question 3/3) : User enter 0 CorrectUser finished the quest with 3 input .(Find the second lowest interger number) Write a program that prompts the user to enter a set of integer numbers, and finally displays the second lowest integer number in the set. To exit from the program enter -1.