Problem = write a program that takes as input from the user three sides of a triangle(numbers),checks and displays whether the triangle is right angled triangle or not?
Write a program that will ask user to enter a digit character (i.e. ‘0’ or ‘1’ .... or ‘9’). If user
enters a non-digit character then the program should display message to re-enter correct input. If user
enters a correct character (i.e. a digit character) then your program should convert that character to
a same digit but in integer type. Do this for five inputs. Finally, add all digits and display their sum. Do
not use any library function or loops.
A New Telephone Company has the following rate structure for long distance calls:
● The regular rate for a call is $0.10 per minute. (10 marks)
● Any call started at or after 6:00P.M. (1800 hours) but before 8:00A.M. (0800 hours) is discounted 50 percent.
● Any call longer than 60 minutes receives a 15 percent discount on its cost (after any other discount is subtracted).
● All calls are subject to a 4 percent federal tax on their final cost.
Write a program that reads the start time for a call based on a 24-hour clock and the length of the call. The gross cost (before any discounts or tax) should be printed, followed by the net cost (after discounts are deducted and tax is added). Print instructions to the user and compute the net cost.
Write a program which takes a 9-digit number input from user, converts it into its reverse and then display one of the following statements: (
• Original number is x steps bigger (where x is the difference between the two) •
Reversed number is x steps bigger
• Both numbers are equal; hence it is a palindrome.
Write a complete C++ program that will prompt name, gender (M or F), age (in years) and marital status (single or married) for each student in FISE and calculate the numbers of married men, single men, married women and single women. Printthese numbers on a student summary report. If any single men are over 30 years of age, print their names and ages on a separate eligible bachelor’s report.
Write a program that will ask user to enter a digit character (i.e. ‘0’ or ‘1’ .... or ‘9’). If user enters a non-digit character then the program should display message to re-enter correct input. If user enters a correct character (i.e. a digit character) then your program should convert that character to a same digit but in integer type. Do this for five inputs. Finally, add all digits and display their sum. Do not use any library function or loops
Write a program that takes two integers as input from the keyboard, representing the number of hits and the number of at-bats for a batter in baseball. Calculate the batter’s hitting percentage and print it, then check if the hitting percentage is above 0.300. If it is, output that the player is eligible for the All Stars Game, otherwise, output that the player is not eligible.
Sample Input
Enter number of hits > 10
Enter number of at-bats > 40
Sample Output
Batters hitting percentage is : 25%
The player is not eligible for the All Stars Game
“The lack of support for emerging networking paradigms is a problem that cannot be tackled easily by employing existing techniques.” (extracted from p.269 of the prescribed textbook).
Search and study one Next‐generation Internet Architecture and then critically discuss how this architecture addresses the shortcomings in the internet architecture presented on p.268 of the prescribed textbook. Ensure that your discussion follows the following format:
A. Introduction
B. Explain what internet architecture is using an example.
C. Describe the Next‐generation Internet Architecture you have selected.
D. Explain how can the Next‐generation Internet Architecture address the shortcomings in the Internet architecture.
E. Conclusion.
Magical Indices
Given an array of integers and a number x.An index is valid if
item y at an index is increased by x and
x+y would be greater than the sum of all other items in the array
write a JS program to determine the number of valid indices
input:
The first line of input contains an array
The second line of input contains a number
output:
The output should be a number indicating the number of valid positions.
input:
[1, 2, 3, 5, 7]
13
output:
3
input:
[34, 32, 37, 38, 40]
10
output:
create a program, name it PRGYOURNAMEFA1, that implements a search and replace function recursively. Your program should allow a user to enter a string , a substring to be replaced in the entered string and a character/s to replace the found substring
Program Structure
1. A main class that implements the logic of the program – name this class TestSearchReplace
2. Add a class named SearchReplace to the main class with two methods, including:
a. SearchSubstring()- return method
b. ReplaceSubString() - void method
The two method should be called using an object in the main class. DONT CREATE THE TWO METHODS IN THE MAIN CLASS
Sample Output:
1 Please enter a string: Hello world
2 Please enter the substring you wish to find: llo
3 Please enter a string to replace the given substring:@@
4 Your new string is: h@@ world