TRENDING NEWS

POPULAR NEWS

Answer Question On Problem Solving For Programming.

Home Work Question on Problem Solving and Programming Concepts?

#1 pg 90
Complete the seven steps of solution development for the following problems:

A painter wants to know the amount of paint needed to paint only the walls and interior side of the door in a doom. The chosen paint covers 1000 square feet per gallon. There are two windows. Test the problem with the following data:

The room is 12 feet long, 10 feet wide, and 8 feet tall.
The two windows are 5 by 3 feet, and 6 by 2 feet, respectively.

#5 pg 91
Mary Williams need to change a Fahrenheit temperature to Celsius. Use the Fahrenheit temperature of 80 degrees to test your solution.
(Hint: C= 5/9(F-32))

Problem Solving and Programming Question C++?

You use = to make an assignment like
c = true //set c to be true

And you use == to compare

if (c==true) //do this is c is true

You used assignment in the while statement and in the if statement. That's probably all it is.

C++ Programming and Problem Solving Q?

Does mail.dat exist in the place you think it does?

I've just tried your program and it just loops around putting out nothing if mail.dat isn't in the folder you're running it from. For input you should check that the file has been opened before trying to read from it.

inData.open("mail.dat");
if (inData.fail())
{
cout << "Couldn't open the input file." << endl;
return -1;
}

For example.

Also, this line is horrible:

cout << s << '\n' << endl << outData << s << '\n';

endl is pretty much equivalent to '\n' so try not to mix the two. Also don't do output to two different file handles on one line use:

{
cout << s << endl << endl;
outData << s << 'endl;
}

Also define the open modes of your files:

inData.open("mail.dat", ios::in); // Open files
if (inData.fail())
{
cout << "Couldn't open the input file" << endl;
return -1;
}
outData.open("addresses.dat", ios::out);

Finally in your while condition you should check for end of file. See whole program below:

#include // For input, output
#include // For file input, output
#include // For text and .length and .find
using namespace std;

int main()
{
ifstream inData; //Define data
ofstream outData;

inData.open("mail.dat", ios::in); // Open files
if (inData.fail())
{
cout << "Couldn't open the input file" << endl;
return -1;
}
outData.open("addresses.dat", ios::out);

string s; // Define string

while (!inData.eof()) // Begin loop
{
inData >> s;
if (s.find('@') != std::string::npos) // Nest If with string.statements
{
cout << s << endl;
outData << s << endl;
}
else if (inData.fail())
cout << "File fail bit now set" << endl;
}
inData.close(); // Close files
outData.close();

return 0;
}

Where to find the answers for Problem Solving and Programming Concepts book?

I just bought a book called Problem Solving and Programming Concepts 9th version by Maureen Sprankle and Jim Hubbard.

There are many problems and question are there but there are no answers.

Can anyone help me find answers?

C++ programming for problem solving?

include
#include

void main()
{
clrscr();
int a[10],n,i,j;
int percent;
int count;
cout<<"
enter the size of array";
cin>>n;
cout<<"
enter the values";
for(i=0;i<=n-1;i++)
{
cout<<" a["< cin>>a[i];
}

for( i=0;i<=n-1;i++)
{ count=0;
for(j=0;j<=n-1;j++)
{ if(a[i]>a[j])
{
count=count+1;
}
}
percent=(count*100)/(n-1);
cout<<"

the percentile of"<<"a["< }
getch();

}

C++ programming - problem solving?

Write a program that will read in a weight in pounds and ounces and will output the equivalent weight in kilograms and grams. Use at least three functions: one for input, one or more for calculating, and one for output. Include a loop that lets the user repeat this computation for new input values until the user says he or she wants to end the program. There are 2.2046 pounds in kilogram, 1000 grams in a kilogram, and 16 ounces in a pound.

Why is programming about problem solving?

Somehow I feel involved. It’s quite simple. Twitter bots can be super rad. Pokemon Go is a huge success. Something called Abc-xyz-whatever-chat can replace Snapchat with exactly the same functionality, because Justin Bieber endorsed it. Sure the developer of that app would be a billionaire. It’s not fair. And it’s statistical. Want to spend your life chasing that faint statistical chance? Go ahead. Compete with millions who want to reinvent Facebook or Snapchat.Don’t develop a Twitter bot or any other spam/marketing crap. Develop the cure for cancer. Or at the very least a specialized medical CRM that simplifies cancer researchers’ life leaving them more time to research that cure.I know how you feel. Real life problems are not obvious. Everything obvious and easy has already been automated. Typically in the entertainment area: porn, blogs, chats, games. Entertainment is the lowest common denominator when it comes to computers. If a computer could bake bread or cook rice, that would have been the most essential problem it could solve, making the entertainment second. Humans need to eat, before they jerk off to porn or feel the urge to let the world know their 140-character opinion about the new Kardashian gossip. The world will survive w/o Twitter. Replaced by a radder BS blog, which will be in turn replaced by something else. Until the novelty of “liking” wears off. Or our planet stops producing food, and eating becomes more important than tweeting.You are just starting your journey. No algorithmic textbook would tell you those problems. Your GPA is of little help. Tutorials teach you how to print “Hello, world”. Or write a Twitter clone (bot, whatever). Most hackathons are also rather abstract exercises.Real life problems and niches can only be discovered on the job. You have no choice, but to get employed somewhere e.g. at an oncology lab. Or some typical half-outsourced shitty “midsize” sweatshop writing software for cancer researchers. You need to suffer for a few years: underpaid and abused by your bosses. You’ll never make a career there. That’s not the point. The point is to absorb the knowledge: about the customer needs. Instead of programming abbreviations. And find like-minded people suffocating at those shitholes and ready to step up and cofound a company with you. Because unlike Facebooks and Kiks, you can’t develop (and most importantly sell) anything “real” on your own.

How can I answer problem-solving questions in an interview?

The best way to answer is with a story in real when that problem occurred and you solved it with the details on how you solved it.Or if you don't have a real life story just explain how you would solve the problem that they are having, if it's a bigger issue and you know they will ask questions about this, you can always prepare a short presentation and you can a copy with you, It will show that you take your job seriously and you are a true professional.Best of luck!

How can I learn to solve bit-wise programming questions?

Bit Manipulation is a fairly straight-forward concept once you get a grasp of the basics. This tutorial will be a good place to develop an understanding of the topic - Tutorial on Bit Manipulation.

TRENDING NEWS