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
vovangra [49]
3 years ago
9

1. Flash Drive Price - An electronics company makes 64 gigabyte USB flash drives that cost them $8.00 apiece to produce. Write a

program to determine how much the company should sell them for if it wants to make a 35 percent profit. Display the result on the screen. Output should look like this:
2. Basketball Player Height –The star player of a high school basketball team is 75 inches tall. Write a program to compute and display the height in feet/inches form. Hint: Try using the modulus and integer divide operations.



Your programs should conform to the Programming Style Requirements as listed in Blackboard under Course Content. In addition, all output should be labeled appropriately
Computers and Technology
1 answer:
BaLLatris [955]3 years ago
3 0

The programs are illustrations of sequential programs,

<h3>What are sequential programs</h3>

Sequential programs are programs that do not require loops (iterations) and conditional statements.

<h3>The flash drive program</h3>

The flash drive program written in C++ where comments are used to explain each line is as follows:

#include <iostream>

using namespace std;

int main(){

   //This calculates the selling price

   double sellingPrice = 8.00 * 1.35;

   //This prints the selling price

   cout<<"Selling price: $"<<sellingPrice;

   return 0;

}

<h3>The basketball program</h3>

The basketball program written in C++ where comments are used to explain each line is as follows:

#include <iostream>

using namespace std;

int main(){

   //This initializes the height in inches

   int heightInches = 75;

   //This prints the height in feet/inches

   cout<<"Height: "<<(heightInches/12)<<" feet, "<<(heightInches%12)<<" inches";

   return 0;

}

Read more about sequential programs at:

brainly.com/question/17970226

You might be interested in
An exact-match query is:
Greeley [361]

Answer:

C. Where a record is returned if its unique identifier matches the search value

Explanation:

Exact match is a Google keyword match type that allows you show your adverts when searcher type the exact word or phrase you are bidding on. An exact match query will always return records that matches what is being searched on.

5 0
3 years ago
Based on the strength of the magnetic fields they produce, arrange the solenoids from strongest to weakest
Deffense [45]

Answer:

C, D, B and A.

Explanation:

Electromagnet in option C is strongest because it has an iron core and the largest current as compared to other solenoids, following by D and then B whereas solenoid A is the weakest because of the absence of an iron core and has the smallest current. Solenoid having iron core is the strongest solenoid because the core produces more strong magnetic field as compared to no iron core.

8 0
3 years ago
Which type of software is for sale directly to consumers in stores and online?
Alex777 [14]

Answer: its b my guy

Explanation:

5 0
3 years ago
Outline various methods of collecting data
Sati [7]

Answer:

interviews

observation

questionering

3 0
2 years ago
Write a program consisting of: a. A function named right Triangle() that accepts the lengths of two sides of a right triangle as
Lunna [17]

Answer:

The java program is as follows.

import java.lang.*;

public class Triangle

{

   //variables to hold sides of a triangle

   static double height;

   static double base;

   static double hypo;

   //method to compute hypotenuse

   static double rightTriangle(double h, double b)

   {

       return Math.sqrt(h*h + b*b);

   }

public static void main(String[] args) {

    height = 4;

    base = 3;

    hypo = rightTriangle(height, base);

 System.out.printf("The hypotenuse of the right-angled triangle is %.4f", hypo);

}

}

OUTPUT

The hypotenuse of the right-angled triangle is 5.0000

Explanation:

1. The variables to hold all the three sides of a triangle are declared as double. The variables are declared at class level and hence, declared with keyword static.

2. The method, rightTriangle() takes the height and base of a triangle and computes and returns the value of the hypotenuse. The square root of the sum of both the sides is obtained using Math.sqrt() method.

3. The method, rightTriangle(), is also declared static since it is called inside the main() method which is a static method.

4. Inside main(), the method, rightTriangle() is called and takes the height and base variables are parameters. These variables are initialized inside main().

5. The value returned by the method, rightTriangle(), is assigned to the variable, hypo.

6. The value of the hypotenuse of the triangle which is stored in the variable, hypo, is displayed to the user.

7. The value of the hypotenuse is displayed with 4 decimal places which is done using printf() method and %.4f format specifier. The number 4 can be changed to any number, depending upon the decimal places required.

8. In java, all the code is written inside a class.

9. The name of the program is same as the name of the class having the main() method.

10. The class having the main() method is declared public.

11. All the variables declared outside main() and inside another method, are local to that particular method. While the variables declared outside main() and inside class are always declared static in java.

4 0
3 years ago
Other questions:
  • Which expansion slot is used by an NVMe compliant device?
    9·1 answer
  • Is the internet useful and why
    7·2 answers
  • Which one of the following words means most nearly the opposite of RANDOM? (remember,opposite)
    12·1 answer
  • Quiero borrar mi cuenta como le hago ?
    6·1 answer
  • Write any two rules for writing algorithm​
    10·1 answer
  • Benchmark test compare similar systems performing in which tasks
    14·1 answer
  • A _____ focuses on creating software systems like tools, utilities, antivirus programs, and operating systems.
    12·2 answers
  • Given main(), complete the Car class (in files Car.h and Car.cpp) with member functions to set and get the purchase price of a c
    6·1 answer
  • you have been tasked with configuring a digital information station in the office's lobby. guests will be able to use the statio
    11·1 answer
  • which command entered without arguments is used to display a list of processes running in the urrent shell
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!