1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
olya-2409 [2.1K]
3 years ago
6

Using functions,

Computers and Technology
1 answer:
ZanzabumX [31]3 years ago
8 0

Answer:

See explaination

Explanation:

#include <iostream>

using namespace std;

int main()

{

double h, w;

int s, a, b;

cout<<"height in feet: ";

cin>>h;

cout<<"width in feet: " ;

cin>>w;

cout<<"tile size in inches:";

cin>>s;

int height = h*12;

if(height%s==0)

a = height/s;

else

a = height/s + 1;

int width = w*12;

if(width%s==0)

b = width/s;

else

b = width/s + 1;

cout<<"Number of tiles: "<<a*b;

}

You might be interested in
What is a nonimpact printer that creates characters and images with dots by using a drum and toner called?
rusak2 [61]

The answer is Laser Printer.  It is a non impact printer that creates characters and images with dots by using a drum and toner.  The main advantages of laser printers are speed, precision and economy. A laser can move very quickly, and because the laser beam has an unvarying diameter, it can draw more precisely, without spilling any excess ink.

5 0
2 years ago
Which of the following method calls are legal?a. mathMethod(x);b. mathMethod(y);c. mathMethod(x, y);d. mathMethod(x + y);e. math
Roman55 [17]

Answer:

Option a, b, d, f, and j is legal method calls.

Explanation:

In the given question some information is missing, that is the method definition which can be described as follows:

Method definition:

int x =2, y=3; //defining integer variable

int mathMethod (int x)  //method definition

{//method body

int z=x+y; //calculate value

return z;  //return value

}

In the given question option a, b, d, f, and j  is legal, because these options follow the correct syntax, and other option were incorrect which can be defined as follows:

  • In option c, It is illegal because it accepts only one parameter.
  • In option e, It is accepts long number, that's why it is illegal.
  • In option g, It accepts float value, that's why it is illegal.
  • In option h, It doesn't accepts any parameter.
  • In option i, It isn't use in method.
7 0
3 years ago
Which of the following is a step in paraphrasing?
Inga [223]

to review the most important supporting points from the original information

7 0
3 years ago
Read 2 more answers
. Write a code to define a linked list node using the above defined structure student (i.e. the data of the node is a student st
enyata [817]

Answer:

struct node{

   student data;

   node* next;

};

Explanation:

The above written is the segment of code is the structure of node of the linked list.The data of the node is type student.So the data of the node of the linked list will consist of the student details and the next is the pointer which holds the address of the next node.

8 0
3 years ago
In C++ :
elena-s [515]

Answer::

//Program is written in C++ Programming Language

// Comments are used for explanatory purpose

#include

#include

#include

#include

using namespace std;

int main(){

ifstream file; // File stream object

string name; // To hold the file name

string inputLine; // To hold a line of input

int lines = 0; // Line counter

int lineNum = 1; // Line number to display

// Get the file name.

cout << "Enter the file name: ";

getline(cin, name);// Open the file.

file.open(name.c_str());// Test for errors.

if (!file){

// There was an error so display an error

// message and end the PROGRAM.

cout << "Error opening " << name << endl;

exit(EXIT_FAILURE);

}

// Read the contents of the file and display

// each line with a line number.

// Get a line from the file.

getline(file, inputLine, '\n');

while (!file.fail()){

// Display the line.

cout << setw(3) << right << lineNum<< ":" << inputLine << endl;

// Update the line DISPLAY COUNTER for the next line.

lineNum++;// Update the total line counter.

lines++;// If we've displayed the 24th line, pause the screen.

if (lines == 24){

cout << "Press ENTER to CONTINUE...";

cin.get();

lines = 0;

}

// Get a line from the file.

getline(file, inputLine, '\n');}

//Close the file.

file.close();

return 0;}

8 0
3 years ago
Other questions:
  • What is the khan academy game where it is a block having to jump over lava and is an endless runner
    9·1 answer
  • how to answer the questions on brainly? I've typed my answer in the box but there's no submit button or whatever, and the only t
    14·2 answers
  • Which attack intercepts communications between a web browser and the underlying computer?
    10·1 answer
  • While there are a some exceptions such as an if-statement, Scheme has one primary syntax () a) True b) False
    14·1 answer
  • Explain the term game! And give me complete sentences. U can use ur opinion as well!
    11·1 answer
  • A company is developing a smart TV that connects to a wireless home network. Which technology can best help to establish this co
    11·2 answers
  • Here is the header for a function named computeValue:
    11·1 answer
  • How would you delete a slide from your presentation after selecting it?
    14·1 answer
  • What is a method that deletes an item from a list using the item’s value?
    11·1 answer
  • What company was affected by the cloudbleed vulnerability?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!