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
Triss [41]
3 years ago
7

Write a function named change() that has an integer parameter and six integers reference parameters named hundreds, fifties, twe

nties, tens, fives, and ones. The function is to consider the passed integer value as a dollar amount and convert the value into the fewest number of equivalent bills. Using the reference parameters, the function should alter the arguments in the calling function. Make sure your function is called from main() and returns a value to main() correctly. Have main() use a cout statement to display the returned value. Test the function by passing various data to it and verifying the returned value.

Computers and Technology
1 answer:
Dmitry_Shevchenko [17]3 years ago
8 0

Answer:

The code for this question is attached below:

You might be interested in
What does a spam e-mail normally promise you?
nlexa [21]
The answer is a virus
7 0
3 years ago
a. Show the output of the following program: 1: public class Test { 2: public static void main ( String [] args ) { 3: A a = new
faust18 [17]

Answer:

See attached file.

Explanation:

See attached file.

Download txt
3 0
3 years ago
Write a program that first calls a function to calculate the square roots of all numbers from 1 to 1,000,000 and write them to a
svlad2 [7]

Answer:

The csharp program to compute square roots of numbers and write to a file is as follows.

class Program  

{  

static long max = 1000000;  

static void writeRoots()  

{  

StreamWriter writer1 = new StreamWriter("roots.txt");  

double root;  

for (int n=1; n<=max; n++)  

{  

root = Math.Sqrt(n);  

writer1.WriteLine(root);  

}  

}  

static void Main(string[] args)  

{  

writeRoots();  

}  

}

The program to compute squares of numbers and write to a file is as follows.

class Program  

{  

static long max = 1000000;  

static void writeSquares()  

{  

StreamWriter writer2 = new StreamWriter("squares.txt");  

long root;  

for (int n = 1; n <= max; n++)  

{  

root = n*n;  

writer2.WriteLine(root);  

}  

}  

static void Main(string[] args)  

{  

writeSquares();  

}  

}  

Explanation:

1. An integer variable, max, is declared to hold the maximum value to compute square root and square.

2. Inside writeRoots() method, an object of StreamWriter() class is created which takes the name of the file as parameter.

StreamWriter writer1 = new StreamWriter("roots.txt");

3. Inside a for loop, the square roots of numbers from 1 to the value of variable, max, is computed and written to the file, roots.txt.

4. Similarly, inside the method, writeSquares(), an object of StreamWriter() class is created which takes the name of the file as parameter.

StreamWriter writer2 = new StreamWriter("squares.txt");

5. Inside a for loop, the square of numbers from 1 to the value of the variables, max, is computed and written to the file, squares.txt.

6. Both the methods are declared static.

7. Inside main(), the method writeRoots() and writeSquares() are called in their respective programs.

8. Both the programs are written using csharp in visual studio. The program can be tested for any operation on the numbers.

9. If the file by the given name does not exists, StreamWriter creates a new file having the given name and then writes to the file using WriteLine() method.

10. The csharp language is purely object-oriented language and hence all the code is written inside a class.

3 0
3 years ago
What is the term of social media
seraphim [82]
It is used to describe a variety of web based platforms, applications, and technologies that allow people to socially interact online.
3 0
3 years ago
​You work for a company that is growing. Originally, all the users in all departments had access to all the data in the database
jeyben [28]

Answer:

B. Assign roles and privileges to users so that only job-relevant data is accessible to the user.

Explanation:

Certain departments will require certain information for certain processes. It is not recommendable for every user to access every information of the company as it may reveal vital information.

Hence, every role and department should be given certain privileges to information according to the tasks and needs of the role.

5 0
3 years ago
Other questions:
  • List and describe three options in the autocad object snap toolbar
    8·1 answer
  • Create an interactive program to use class a LightsOut class to allow a user to play a game. Each step in the game will require
    6·1 answer
  • Jason Has A Science Video Project, As He Creats His Project, He Saves, Then Comes Back A Minute Later. The File Is Now Unreadabl
    8·2 answers
  • The smallest unit of storage is​
    15·1 answer
  • Which examples demonstrate common education and qualifications for Manufacturing Production Process Development careers? Check a
    12·2 answers
  • Write the algorithm for finding the perimeter of a rectangle using English like form step by step
    10·1 answer
  • To access documents stored on a "cloud", you'll
    12·1 answer
  • Which of the following does Secure Sockets Layer (SSL) use to authenticate a user or system before encrypting a session?
    14·1 answer
  • Tips for staying safe using social media. Using in your own words.
    6·1 answer
  • If you had tickets for the concert and saw these alerts, what should you do?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!