Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Create a structure called employee that contains two members: an employee

number (type int) and the employee’s compensation (in dollars; type float). Ask the

user to fill in this data for three employees, store it in three variables of type struct

employee, and then display the information for each employee.


Given three sides of the triangle(a, b, c) as input. Write a program to determine whether the triangle is Equilateral, Isosceles or Scalene.Input


The first line of input will contain an integer A.

The second line of input will contain an integer B.

The third line of input will contain an integer C.Output


If the given sides A, B and C are equal, print "Equilateral".

In the given sides any of two sides are equal print "Isosceles".

If the given sides A, B, C are not equal to each other, print "Scalene".Explanation


For example, if the given sides are 4, 4, 4 the output should be "Equilateral".

Similarly, if the given sides are 3, 2, 3 the output should be "Isosceles".


The following program prints a picture of a large letter I. The output has 13 rows and 7 columns. The first row and last two rows make horizontal lines at the top and bottom of the letter. The other 10 rows form a vertical line in the letter. The program output should look as follows:

-------

|

|

|

|

|

|

|

|

|

|

-------

-------

Some pieces of the code have been replaced by PART (a), PART (b), and so on. To answer the 6 parts of this question you should supply the part of the line of C++ code that was replaced. Each answer must fit on a single line.

int main()

{

int rows = 13;

int cols = 7;

for (int c = 1; {\bf PART (a)} ){

cout << "-"; }

cout << endl;

for (int r = 1; {\bf PART (b)} ){

for (int c = 1; {\bf PART (c)} ){

cout << " "; }

cout << {\bf PART (d)}; }

for ({\bf PART(e) }){

for ({\bf PART (f) }){

cout << "-"; }

cout << endl; }

return 0; }


Insert the missing condition in the following code fragment. The code is intended to compute the product of several integers entered by the user. The loop should stop when the user enters something other than an integer.

int product = 1;

int value;

cin >> value; while (______ )

{

product = product * value;

cin >> value;

}


”a”, ”e”, ”i”, ”o”, and ”u” are called vowels. word is a variable of type string.
Assume that a word is read from the keyboard and assigned to this variable. Write a
for loop to count the number of vowels in a word. Only write the for loop. Those who
write more than required number of lines, are going to lose points.
Write an if else statement using a Boolean expression to test whether exactly one of two
integers is zero. Assume x, y are variables of type int and are declared and initialized.
The if block should print the following message: Exactly one of x or y is zero and the
else block should print: Neither or both of x and y are zero.

Consider a flow chart for computing travel time between Wall Street in Manhattan and St. John’s University. Write a code fragment that represents this flow chart. Assume that there are variables called route and rush hour of type string.


write a C++ statement that assigns a 4 digit random number between 1000 and 10000 as the value of the variable n


Consider a flow chart for computing travel time between Wall Street in Manhattan and St. John’s University. Write a code fragment that represents this flow chart. Assume that there are variables called route and rush hour of type string.


Given the variable n of type int and the variable s is of type string, translate the following conditions to C++.

1. n is at least 10.

2. s begins and ends with the same letter.


LATEST TUTORIALS
APPROVED BY CLIENTS