Identify all the errors of the following C++ program, write down the line number and the error you find. 1. winclude using name-space std; 2 Bint main() { int i, nbr nbr; 1/mbrnbr is for testing numbers double nbri =- e, nbrmax; 4 do { cout « "Enter the number of values to be tested : - cin » nbrnbr; 9 10 11 12 for(i==1; ic==nbrnbr; i+) 13 14 cout « "Enter the value number " «i « : cin >» nbrl; if (nbrmax < nbr1) nbrmax <= nbr1; 15 16 17 18 cout « "The greatest value" of those entered humbers is : " « nbrmax « endl; ) while(nbrnbr != 0); system("pause"); 19 20 21 22 Write and test the corrected C++ program and write down what is the output.
Q: Write a program in cpp language to reverse the bits of a user entered number and print the decimal f...
A: Ans:> Code: #include <iostream> using namespace std; unsigned int reverseBits(unsigned int...
Q: True or False The strategy of breaking down the problem into smaller pieces is often called trial a...
A: 1. True 2. False 3. True 4. True 5. True
Q: What's the difference between Stored Procedures and Scripts? What is the purpose of each? How does e...
A: Stored Procedure It is a SQL command that is already compiled and stored on server. It can be reuse...
Q: What exactly does 'backing up your data' imply?
A: what exactly does backing up your data imply
Q: PROVIDE JS SOURCE CODE Design a web page with a text box (username) where the user can enter a name ...
A: I have written the code as you asked. To complete this code we need to know about form elements and ...
Q: format has field which is divided into 2 subt each having 15 distinct microop condition field CD for...
A: given - A micro instruction format has micro operationfield which is divided into 2 subfields F1 and...
Q: What role does Moore's law play in the development of supercomputers, grids, and clusters?
A: INTRODUCTION: Gordon Moore's Law states that the number of transistors on a microchip doubles every...
Q: Do you know when year the first computer chip was made?
A: Do you know when year the first computer chip was made?
Q: Provide an explanation for excessive redemption requirements.
A: explanation for excessive redemption requirement
Q: onsidered as the brain of the computer system. Select one: a. ALU b. CU c. MU d. CPU Cons...
A: Considered as the brain of the computer system. Select one: a. ALU b. CU c. MU d. CPU Cons...
Q: What is the name of Thomas Watson Jr.'s father?
A: Name of Thomas Watson Jr.'s father : Thomas J. Waston Thomas John Watson Sr. (February 17, 1874 - J...
Q: A star algorithm code for rush hour puzzles game
A: Explain A star algorithm code for rush hour puzzles game.
Q: Vhat security flaws are exploited and how may these issues be addressed in the future in the case of...
A: Introduction: Data damage is defined as any decrease in integrity or data acquisition. Damage to a c...
Q: Is there a difference between a system subsystem and a logical division?
A: INTRODUCTION: A system is a collection of interconnected or interacting pieces that follow a set of...
Q: When it comes to infrastructure and architecture, what is the difference
A: InfrastructureInformation technology infrastructure is a broad term that refers to a collection of i...
Q: Forgetting a semi-colon at the end of a statement or misspelling a certain command is an example of ...
A: Question 1: Compile-time errors are said to be the errors which occur when we write the wrong syntax...
Q: Create a flowchart that will accept the name and grade of a student in computer programming for prel...
A: Flow chart is attached below which accept student name and marks and compute average
Q: Which type of memory is used for the main storage?
A: There are basically two types of memory primary memory and secondary memory,we according to question...
Q: Apply Image Segmentation clustering to cluster the following data points with value of K=3 and Initi...
A: Euclidean Distance formula is : d(p,q)=d(q,p)= (q1-p1)2+(q3 - p3)2 +....+(qn-pn)2= ∑i=1n(qi-pi)2 ...
Q: a What is the "particular form of price elasticity" that Moore's Law is said to have? b. Give a brie...
A: According to Moore's Law: Gordon Moore coined the term "Moore's Law" in 1965, when microprocessors b...
Q: iven this statement: “Garfield is a cat who loves to eat tuna. Tuna is a kind of fish, and fish norm...
A: Semantic networks are alternative of predicate logic for knowledge representation. we can represent ...
Q: If there are page faults 99 percent of the time, then that means they happen a lot (that is, a page ...
A: Management of Virtual Memory (Cache): TLB is an acronym for Translation Lookaside Table. It is a kin...
Q: write jframe in java eclipse just simple interface shows that the 'doctor' can view their booking by...
A: ANSWER:-
Q: What kind of electricity does a computer consume?
A: let us see the answer:- Introduction:- Laptops typically utilize 20-50 Watts of power, which can be ...
Q: Create a program that will compute the basic salary of the employee, the daily rate of the employee ...
A: Note :- You have not mention the language of program, So I am doing the program in C++ language.
Q: Provide an explanation for excessive redemption requirements.
A: Introduction: If the standards for disproportionate redemption under section 302 are met, stock rede...
Q: Define the characteristics that are required for test-driven development. In the event that you wish...
A: According to the question essential principles of check pushed improvement TDD and assuming that you...
Q: What did Charles Babbage do for mathematics?
A: Introduction: University of Cambridge: The Institution of Cambridge is the second oldest university ...
Q: Write a script titled HW5.m that • Uses both methods to compute the hangtime of a projectile, with a...
A: Solution: Given,
Q: Look for Arduino Applications Online and Discuss it. include images and pictures of your research. M...
A: Arduino is a hardware and software development business. They make the Arduino Uno board, an open-so...
Q: 3 6. Evaluate the determinant for the following matrix: 5 O A.B ов. 2 O C.5 O D.-4
A: solution: Answer is: A. 8
Q: Who designed Harvard's buildings?
A: The first and only building in the United States designed by the 20th Century architect Le Cor busie...
Q: Consider a two-link network where Host A is connected to the router by a 1 Mbps link with 10 ms prop...
A: TRANSMISSION DELAY: In a computer network The word ...
Q: 3 6. Evaluate the determinant for the following matrix: O A.8 O B.-2 O C.5
A: Here in this question we have given to matrix and we have asked to find determinant of matrix.
Q: Consider a computer with the following characteristics: total of 4 Mbyte of main memory; word size o...
A: 3 B B C A E : 0011 1011 1011 1100 1010 1110 main memory: 4MB = 222 Bytes word size = 1 Byte block si...
Q: You have a card on which the letter J is written on one side and K on the other. You want to see all...
A: The program illustrate a recursive function in java with a simple card problem as given in the stat...
Q: Why is Access preferable than Excel when it comes to tracking this data?"
A: Generally, Access is preferred over Excel while tracking the data due to its efficiency and vast and...
Q: In how many books did John von Neumann write his thoughts?
A: John Von Neumann was a polymath and pioneer in the use of operator theory in quantum mechanics, in t...
Q: Your Facebook account has just been hacked and you want to change its password. To create a strong p...
A: 1) Have used both capital and lowercase in your writing. 2) Make use of integers. 3) Make use of ico...
Q: Determine the primary purposes of a database and how they differ. Describe why businesses require bo...
A: Defined the primary purposes of a database and they differ and businesses require both of these data...
Q: Problem-3: Tire Using the Magic Formula described in Section 14.4, estimate and plot the aligning to...
A: Magic formula : y(x)=Dsin{Ctan-1[Bx-E(Bx-tan-1(Bx))]} Y(X)= y(x) + Sv x=X + Sh or X= x-Sh Where, Y(X...
Q: Briefly describe the FOUR (4) types of documents created i
A: given - Briefly describe the FOUR (4) types of documents created in a software development project.
Q: Vhat security flaws are exploited and how may these issues be addressed in the future in the case of...
A: Introduction: Data damage is defined as any decrease in integrity or data acquisition. Damage to a c...
Q: Who was Mark Dean's source of inspiration?
A: Mark Dean (president of the Board of Education): One of the world's leading computer scientists, Mar...
Q: What was the name of the first computer company that went commercial?
A: INTRODUCTION: A computer is a digital electrical machine that can be programmed to perform arithmet...
Q: What is the origin of the Colossus machine?
A: The Colossus computers were created by British codebreakers between 1943 and 1945 to aid in the cryp...
Q: Write a program to generate the numbers following: a) (-1, 3, -5, 7, -9, 13, -15, 17, -19, 23) on Te...
A: Actually, array is a collection of elements.
Q: What is the Single Audit Act, and how does it work? What impact has this statute had on the auditing...
A: Introduction: Single Audit Act: The Single Audit Act requires that each entity receiving grants or f...
Q: Which type of memory is used for the main storage?
A: given - Which type of memory is used for the main storage?
Q: There are blank 3 digit counting numbers that are made using only the odd digits 1,3,5,7,9 ?
A: Here in this question we have we have asked to make 3 digit numbers from 1,3,5,7,9. Note- here nothi...
Step by step
Solved in 4 steps with 2 images
- This assignment is not graded, I just need to understand how to do it. Please help, thank you! Language: C++ Given: Main.cpp #include #include "Shape.h" using namespace std; void main() { /////// Untouchable Block #1 ////////// Shape* shape; /////// End of Untouchable Block #1 ////////// /////// Untouchable Block #2 ////////// if (shape == nullptr) { cout << "What shape is this?! Good bye!"; return; } cout << "The perimeter of your " << shape->getShapeName() << ": " << shape->getPerimeter() << endl; cout << "The area of your " << shape->getShapeName() << ": " << shape->getArea() << endl; /////// End of Untouchable Block #2 //////////} Shape.cpp string Shape::getShapeName() { switch (mShapeType) { case ShapeType::CIRCLE: return "circle"; case ShapeType::SQUARE: return "square"; case ShapeType::RECTANGLE: return "rectangle"; case…#include using namespace std; int main() { int x,y; or (x=0 ;x 3) break ; cout << y << endl; | }}} O 5 9. O 4 O 10#include<iostream>using namespace std;void main(){double pi = 0, denominator = 1;int counter = 999999;for (int x = 0; x < counter; x++){if (x % 2 != 0){pi = pi - (1 / denominator);}else{pi = pi + (1 / denominator);}denominator = denominator + 2;}pi = pi * 4;cout << " So the computed value of a PI is = " << pi << endl;cout << " ";//return 0;system("pause");} Note: This a program called ComputePI to compute the value of π Tutor just have to Modify This program to use nested-if (if ... else if ... else if ... else) instead. Explain by applying a double line comment
- #include using namespace std; void some_action_1(int); int main() { cout<Refer to the statement below, #include void main() { int i; int number[11]={12,15,17,3,2,7,10,10,15,15,50}; for(i=0;i < 11; į++){ printf(" %d", number[i]); } Write a segment in C language to: Compute the average number Find the maхітит аnd minimum питberNeed help completing C++ program #include #include #include #include #include static pthread_mutex_t bsem; static pthread_cond_t waitTurn = PTHREAD_COND_INITIALIZER; static int turn; static int nthreads; void *print_in_reverse_order_odd_then_even(void *void_ptr_argv) { // std::cout << "I am Thread " << /*variable identifier*/ << std::endl; return NULL; } int main() { std::cin >> nthreads; pthread_mutex_init(&bsem, NULL); // Initialize access to 1 pthread_t *tid= new pthread_t[nthreads]; int *threadNumber=new int[nthreads]; //HINT: this code determines the starting thread (thread with the highest odd number). //You can erase this if statement if your solution does not need to know the starting child thread number. if ((nthreads-1)%2!=0) turn = nthreads -1; else turn = nthreads -2; for(int i=0;iCode using c++ 2. Solving a Person's Loneliness by CodeChum Admin It's been 1,245 years and our sole Person is getting lonelier each day. This Person definitely needs a partner! Thus, we need to update our Person's design to have a gender as well and there shall be male and female! Instructions: In the code editor, you are provided with the definition of a struct Person. This struct needs an integer value for its age. Furthermore, you are provided with a displayPerson() function which accepts a struct Person as its parameter. Your task is to first update the struct Person so that it can have a gender as well. For this program, we shall represent a gender with a single character: 'M' for male and 'F' for female. Then, create a Person, take in an integer user input and a character user input, and then set them as the Person's age and gender respectively. Finally, call the displayPerson() function and pass that Person you created. Input 1. The age of the Person 2.…(Numerical) Write a program that tests the effectiveness of the rand() library function. Start by initializing 10 counters to 0, and then generate a large number of pseudorandom integers between 0 and 9. Each time a 0 occurs, increment the variable you have designated as the zero counter; when a 1 occurs, increment the counter variable that’s keeping count of the 1s that occur; and so on. Finally, display the number of 0s, 1s, 2s, and so on that occurred and the percentage of the time they occurred.C++ only Upvote for your own work and correct answer/ Downvote for copying the answer from a different website. It must be in C++ and it must be a working code. It needs to follow the required directions for example: MAKE SURE IT POINTS OUT EVERY TIME THE STATEMENT IS INVALID IF IT IS INDEED INVALID. Thank You. Assignment: Create a C++ program that can test the validity of propositional logic. Remember, a propositional logical statement is invalid should you find any combination of input where the PROPOSITIONAL statements are ALL true, while the CONCLUSION statement is false. Propositional Statements: If someone has a rocket, that implies they’re an astronaut. If someone is an astronaut, that implies they’re highly trained. If someone is highly trained, that implies they’re educated. Conclusion Statement: A person is educated, which implies they have a rocket. Your output should declare the statement to either be valid or invalid. If it’s invalid, it needs to state which combination…#include using namespace std3; int main() { int x-6; int y=103; int z=0; int q=1; Z+= X-- -ys q*=++z+y; cout<✓ Allowed languages C Problem Statement Write a C Program that will compute for npr (n taken r permutations). Input Input starts with a number N and is followed by N pairs of numbers n and r. Output Output n Pr Limits 1#include using namespace std; int main () int x, y; { X = 5; y = ++x cout << x << y; %3D ++x; %3D x = 5; y = x++ * ++x; cout << x < y; return e; } 525636 747953 749735 636636SEE MORE QUESTIONSRecommended textbooks for youC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program…Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program…Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage