Best Solutions to Programming Problems in any Programming Language
Simple and well-optimized solutions to any coding problems in any programming language. Also, explore answers to technical coding questions.
- If the truth value of (negation p ➡️ q) ➡️ ( p v negation r) is false, then what is the truth value negation p ↔️ r ?
- Make a c++ program that will print the given output using do while loop. Output: 5 6 7 8 9
- Make a c++ program using nested loop that will display this output: 11 12 13 14 15 11 12 13 14 11 12 13 11 12 11
- Write a program to demonstrate the use of pointer to pointer. Make a list of characters (a word) by char *word, another list of words (a sentence) using char **sentence. Print the sentence using a double pointer.
- Define and initialize five arrays of integer types each having 6 elements and an array of pointers p of size 5. Store the starting address of each array to an array of pointers p. Design and call the function and initialize the values…
- Given an equation x1 + x2 + · · · + xn = k, where k is a constant, and x1, x2, . . . ,xn are nonnegative integers (which are considered as variables in the equation), list all the solutions. Write a C or C++ program to solve this p…
- How to can write a C++ program that will print the following shapes. A. * *** ***** ******* ********* B. * *** ***** *** *
- A) Create a function called To_Celsius that takes in a temperature in Fahrenheit temperature and returns the equivalent in Celsius. B) Create another function called To_Fahrenheit that takes in a temperature in Celsius and returns the…
- Input two integers (one per line) and make sure to store them in variables. Add the two integers and print out their sum!
- Input three decimal numbers in one line separated by spaces, and make sure to store them in different variables. Multiply the 1st and 2nd decimal numbers, and store the product into a variable. Then, divide the product of the 1st and …
- Input five integers in one line, with each integer separated by a space. Add the 1st and 2nd integers together and store the sum inside a variable. Add the 3rd and 4th integers together and store the sum inside a variable. Multiply th…
- Make a C++ program using do while loops that will print this output: * ** *** **** *****
- Given an array A (8,8). Find the sum and the number of positive elements, located below the main diagonal the smallest element of the array (minimum).
- 1. A prime number is an integer greater than one and divisible only by itself and one. The first seven prime numbers are 2, 3, 5, 7, 11, 13, and 17. Write a program that displays all the prime numbers between 1 and 100 2. Write ano…
- First, read in an input value for variable numInput. Then, read numInput integers from input and output each integer on a newline after the string "input = ". Ex: If the input is 2 30 40, the output is: input = 30 input =…
- Input three decimal numbers in one line separated by spaces, and make sure to store them in different variables. Multiply the 1st and 2nd decimal numbers, and store the product into a variable. Then, divide the product of the 1s…
- #include
int main() { char letter1; char letter2; char letter3; std::cin>>letter1; std::cin>>letter2; std::cin>>letter3; std::cout< - Input three random characters and make sure they are inputted on different lines. Print out the three strings in order, each on a different line, using only 1 std::cout statement and newline characters (\n). An initial code wi…
- Writing a small program for Bank Management System. In this program, we are using the concept of C++ class and object, following basic operations are being performed: • Deposit • Withdraw In this program, we have created a class …
- Write a Program: Compute an average of integer values Ask the user to enter a number of values to average in the range from 2 to 10. Use a loop to make sure the entered number is within the range. Output an error message any time an…
- This program will read integers from a file and find results from these integers. Open the file, test to make sure the file opened. Use a loop to read the integers and process each integer as it is read. When End Of File is reached, …
- In a car race game, when a car object is created it should be filled with fuel, and placed at certain x,y coordinates. Once the game is over, all cars should be deleted ? How do you handle it using c++ classes. Write suitable c++ code
- The tap code, sometimes called the knock code, is a way to encode text messages on a letter-by-letter basis in a very simple way. Tap code has been one of the most basic communication protocols and still used to convey SOS messages an…
- Consider the following function definition: int func(int x, double y, char u, string name) { //function body } Which of the following are correct function prototypes of the function func? a. int func(x, y, u, …
- Write a C++ program that accepts marks of five students and then displays their average. The program should not accept mark which is less than 0 and mark greater than 100.
- First, read in an input value for variable numVals. Then, read numVals integers from input and output each on the same line with the character ", " between each value. End with a newline. Note: ", " should not be…
- Lobatsi House of Brokers (LHB) is an organization responsible for keeping track of all brokers nationwide. A broker acts as a middle man between a buyer and a seller; a buyer communicates with a broker for arrangements of trade with t…
- Consider the following statements: int num1, num2, num3; double length, width, height; double volume; num1 = 6; num2 = 7; num3 = 4; length = 6.2; width = 2.3; height = 3.4 and the function prototype: double …
- Mark the following statements as true or false. a. All members of a struct must be of different types. b. A function cannot return a value of type struct. c. A member of a struct can be another struct. d. The only …
- Write a c++ program for the World Bowling Competition. An input file, score.txt, contains the name of each player, the name of the player's team and each player's individual score. There will only be two teams(Blue and White). Read th…
- Pls help me to implement this program #include
using namespace struct NameType { string first; string middle; string last; }; struct AddressType { string address1; string address2; string city; str… - Which of the following apply to the while loop only? To the do...while loop only? To both? a. It is considered a conditional loop. b. The body of the loop executes at least once. c. The logical expression controlli…
- First, read in an input value for variable numInput. Then, read numInput integers from input and output each on the same line with the character ": " between each value. End with a newline. Note: ": " should not b…
- Write a two dimensional arrays that searches a number and display the number of times it occurs on the list of 12 input values. Sample input/output dialogue: Enter twelve numbers: 15 20 12 30 35 40 16 18 20 18 20 Enter a number …
- Pls help me to implement this program #include
using namespace struct NameType { string first; string middle; string last; }; struct AddressType { … - For you to be allow to participate in on going convocation,you must have meet up with the school criteria and completed your registration. If any of these conditions are not met , you can not be eligible to graduate with the present g…
- How to implement this using vector #ifndef __ROCKPAPERSCISSOR_H__ #define __ROCKPAPERSCISSOR_H__ enum ObjectType { ROCK, PAPER, SCISSOR }; void displayRules(); ObjectType retrievePlay(char selection); bool …
- Create a program that will display a different output based on the user input. If the user entered a number more than 50, it will display 'The number is greater than 50'. Otherwise, it will display, 'The number is lesser than what I e…
- The population of town A is less than the population of town B. However, the population of town A is growing faster than the population of town B. Write a program that prompts the user to enter: The population of town A The populati…
- Write a program that uses do...while loops to perform the following steps: Prompt the user to input two integers: firstNum and secondNum (firstNum must be less than secondNum). Output all odd numbers between firstNum and secondNum. O…
- Write a program that uses for loops to perform the following steps: Prompt the user to input two integers: firstNum and secondNum (firstNum must be less than secondNum). Output all odd numbers between firstNum and secondNum. Output t…
- write c++ programm to swap first and last element of an integer 1-D array
- Paula and Danny want to plant evergreen trees along the back side of their yard. They do not want to have an excessive number of trees. Write a program that prompts the user to input the following: The length of the yard. The radius o…
- For this assignment Write a program in ‘C++’, that uses a Nested Structure to accept the name of five Players of Chess: Numbers of games played Date of Birth Date of playing first international game Age Status either win or loss…
- Write a C++ function, smallestIndex, that takes as parameters an int array and its size and returns the index of the first occurrence of the smallest element in the array. To test your function, write a mainthat prompts a user for a l…
- In main take two numbers as input num1 and num2. Main thread will create 2 more threads. 1. T1: Output sum of numbers from min(num1 , num2) to max(num1 , num2) 2. T2: Take a string as input and count num1 and num2 in it.
- Which of the following apply to the while loop only? To the do...while loop only? To both? a. It is considered a conditional loop. b. The body of the loop executes at least once. c. The logical expression controlling the loop…
- Suppose that x, y, and z are int variables, and x = 10, y = 15, and z = 20. Determine whether the following expressions evaluate to true or false: a. !(x > 10) b. x <= 5 || y < 15 c. (x != 5) && (y != z) d. x >= z || (x + y >= z) …
- Suppose that x, y, and z are int variables, and x = 10, y = 15, and z = 20. Determine whether the following expressions evaluate to true or false: a. !(x > 10) b. x <= 5 || y < 15 c. (x != 5) && (y != z) d. x >= z || (x + y >= z) …
- Which of the following apply to the while loop only? To the do...while loop only? To both? a. It is considered a conditional loop. b. The body of the loop executes at least once. c. The logical expression controlling the loop is ev…