297 Answered Questions for the topic Computer
04/26/21
Sher. Write a word shortener.
Write a word shortener. Read in a string (you may assume no spaces). If it is 4 characters or less, print it back out. If it is more than 4 characters, print just the first two followed by the last...
more
04/26/21
Caturday Check. Read a string (will not have spaces).
Read a string (will not have spaces). Print "true" if the word "cat" appears starting at the first or second letter. Otherwise print false.Samples:
Input: catch Output: true
Input: scatter ...
more
04/26/21
First Middle Last Letter. Read in a string from cin (it will not have any whitespace).
Read in a string from cin (it will not have any whitespace). Print out the first character, middle character (if string is an even length, print the second of the two middle letters), and last...
more
04/26/21
All To Upper. Read a string from cin into word and modify it so that it has all uppercase letters.
Read a string from cin into word and modify it so that it has all uppercase letters.Samples:
Input: hello Output: HELLO
Input: h3Llo Output: H3LLO
Hints:
You can only change the code in the...
more
04/26/21
String Compactor. Write code that will read in a string and then print out every other character of the string.
Write code that will read in a string and then print out every other character of the string. You should use getline to read in the string... it may have spaces.Samples:
Input of "Hello" should...
more
04/25/21
a program that reads names from a file However, the program does not work as expected. It gives an ArrayOutOfBounds exception. Correct this without changing the size of the array.
Here is a program that reads names from a file Friends-1.txt download and stores them in an array called friends.It then asks the user for a name and searches the array for the friend. If it...
more
04/25/21
Explain ways Scanner class create objects that can input data from the three types of input sources. Give 3 examples of the use of Scanner objects. Describe 1 Scanner method
Explain the ways in which the Scanner class can be used to create objects that can input data from the three types of input sources.Give 3 examples of the use of Scanner objects. Describe 1 Scanner...
more
04/25/21
Modify the above program so that it reads from the file FriendsPhones.txt, download the friends name into the friends array and corresponding phone number into an array called phoneNumbers. Upd
Modify the above program so that it reads from the file FriendsPhones.txt, download the friends name into the friends array and corresponding phone number into an array called phoneNumbers. Update...
more
04/25/21
Method called searchGenius inputs information from user& tries to find a genius student.. Not work as expected. debug the method by 1. What line does error occur? 2. what is the error & why 3. correct
Here is a method called searchGenius inputs information from the user and tries to find a genius student. A "genius" student is considered to be one who is between 18 and 21 years of age, has...
more
04/25/21
For each of the following while loops, how many times will the loop execute its body? Remember that "zero," "infinity," and "unknown" are legal answers.
For each of the following while loops, how many times will the loop execute its body? Remember that "zero," "infinity," and "unknown" are legal answers.a)
int x = 1;
while (x < 100) {
...
more
04/25/21
What is Fencepost algorithm? Use it to write a method called countLengths that takes in a String array of 7 elements as parameter& prints the number of characters in each string separated by ",".
Explain "Fencepost algorithm" Use this technique to write a method called countLengths that takes in a String array of 7 elements as parameter& prints the number ofcharacters in each string...
more
04/23/21
What is the minimum decimal value (negative value) represented by an 8-bit signed binary number with a 4-bit fraction?
What is the minimum decimal value (negative value) represented by an 8-bit signed binary number with a 4-bit fraction?
04/12/21
Next Two Letters. Read in a character (it will always be a lower case letter). Print out the two letters that come after it without any spaces. Once you go past 'z' you should wrap back to 'a'.
Read in a character (it will always be a lower case letter). Print out the two letters that come after it without any spaces. Once you go past 'z' you should wrap back to 'a'.Hint: You can add...
more
04/12/21
Char Sorter. Write a program that sorts chars into 1 of 3 groups.
Write a program that sorts chars into 1 of 3 groups. Letters A-J are in group 1, K-P in group 2, Q-Z in group 3. You should read in one character and print out the group it belongs in - assume the...
more
04/11/21
What is the number of 6 character passwords containing the word "mate"?
What is the number of 6 character passwords containing the word "mate"?
04/05/21
C++. Write a program that reads three integers from cin and outputs them in order from smallest to largest.
C++.Write a program that reads three integers from cin and outputs them in order from smallest to largest.Example: input of 3 8 5 should result in output of:3 5 8Hints:
You do not have to actually...
more
04/05/21
C++. An international phone call is billed by the minute according to this scheme: Calls up to 10 minutes cost a flat $5.
An international phone call is billed by the minute according to this scheme: Calls up to 10 minutes cost a flat $5. Calls over 10 minutes but less than 30 cost $.50 per minute. Calls 30 minutes or...
more
04/05/21
In a dice game, you get the total you roll on two dice, unless they are the same, in which case you get double what they total. Write a program that helps score the game.
C++. In a dice game, you get the total you roll on two dice, unless they are the same, in which case you get double what they total. Write a program that helps score the game.Read in two integers...
more
04/05/21
Orders from a company that cost $100 or more get a 10% discount. Orders less than $100 do not get a discount.
C++.Read in an decimal value representing the undiscounted order price, and print out what the order should cost.Just print the value - do not add a $ or try to make it look like...
more
04/05/21
Read in a single integer from cin. If it is 7, output "Lucky". If it is not 7, output nothing.
C++#include <iostream>using namespace std;int main(){ //YOUR_CODE}
04/05/21
C Programming. First, fully parenthesize the following expressions according to the precedence and associativity rules.
First, fully parenthesize the following expressions according to the precedence and associativity rules. Then, replacing the variables and constants with the appropriate type names, show how the...
more
04/01/21
Your job is to implement the default (no argument) constructor that sets time to midnight. Hint: The constructor is going to need Time:: in front of its name.
Read the existing code for Time. It stores a time of day in 24 hour format with 0 hours indicating midnight and 12 hours indicating noon.Your job is to implement the default (no argument)...
more
04/01/21
Replace YOUR_CODE with code that will create a point p2 that is 4 units to the right of p1 and 3 units below it.
Read the provided code for the Point class that represents a point on a standard Cartesian plane. Then read the provided code in main.Replace YOUR_CODE with code that will create a point p2 that is...
more
04/01/21
Does HP Envy 13-ah1507sa has changeable BIOS CMOS battery?
Hi i am post here first time as my HP envy 13-ah1507sa suddenly shut down and never started but when u unplugged the battery the it stared with AC cable plugged in and during start-up it says CMOS...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.