Answer:
The equivalent program in C++:
#include<iostream>
#include <sstream>
using namespace std;
int main(){
string Score, Rank;
cout<<"Enter student score and class rank: ";
cin>>Score>>Rank;
int testScore = 0, classRank = 0;
stringstream sstream(Score);
sstream>>testScore;
stringstream tream(Rank);
tream>>classRank;
if (testScore >= 90){
if(classRank >=25){cout<<"Accept";}
else{cout<<"Reject";}
}
else if(testScore >= 80){
if(classRank >=50){cout<<"Accept";}
else{cout<<"Reject";}
}
else if(testScore >= 70){
if(classRank >=75){cout<<"Accept";}
else{cout<<"Reject";}
}
else{cout<<"Reject";}
return 0;
}
Explanation:
This declares Score and Rank as string variables
string Score, Rank;
This prompts the user for score and class rank
cout<<"Enter student score and class rank: ";
This gets the user input
cin>>Score>>Rank;
This declarees testScore and classRank as integer; and also initializes them to 0
int testScore = 0, classRank = 0;
The following converts string Score to integer testScore
stringstream sstream(Score);
sstream>>testScore;
The following converts string Rank to integer classRank
stringstream tream(Rank);
tream>>classRank;
The following conditions implement the conditions as given in the question.
If testScore >= 90
if (testScore >= 90){
If classRank >=25
if(classRank >=25){cout<<"Accept";}
If otherwise
else{cout<<"Reject";}
} ---
If testScore >= 80
else if(testScore >= 80){
If classRank >=50
if(classRank >=50){cout<<"Accept";}
If otherwise
else{cout<<"Reject";}
}
If testScore >= 70
else if(testScore >= 70){
If classRank >=75
if(classRank >=75){cout<<"Accept";}
If otherwise
else{cout<<"Reject";}
}
For testScore less than 70
else{cout<<"Reject";}
Ram and Hari can finish a piece of work in 6 days and 12 days respectively in how many days will they finish it working together
Answer:
4 days
Explanation:
Given - Ram and Hari can finish a piece of work in 6 days and 12 days
respectively.
To find - In how many days will they finish it working together
Proof -
As given,
Ram and Hari can finish a piece of work in 6 days and 12 days respectively.
⇒1 day work of Ram done in = [tex]\frac{1}{6}[/tex]
1 day work of Hari done in = [tex]\frac{1}{12}[/tex]
If they work together,
1 day work of both together done in = [tex]\frac{1}{6}[/tex] + [tex]\frac{1}{12}[/tex] = [tex]\frac{2 + 1}{12} = \frac{3}{12}[/tex] = [tex]\frac{1}{4}[/tex]
As we know Work is inversely proportional to efficiency
And efficiency = Person's 1 day work
As we have ,
1 day work of both together done in = [tex]\frac{1}{4}[/tex]
⇒ Total work done in 4 days if they work together.
visual media that gives the appearance of a movement can be a collection of graphics
its called animation, a collection of a movement of graphics.
Service and software companies typically have a high return-on-assets ratio because they require lower blank as compared to manufacturing companies.
Answer:
So whats the question here? Your just saying a statment ...
Explanation:
Answer:
Resources
Explanation:
The logical answer would be resources. As someone who has ran both, a software company requires less physical resources such as materials, tools, a large labor force, etc. With a manufacturing company, it requires a lot more tangible resources to be successful. Not sure if that is the correct answer, but it is the most logical one.
Which code segment results in "true" being returned if a number is odd? Replace "MISSING CONDITION" with the correct code segment.
a) num % 2 == 0;
b) num % 2 ==1;
c) num % 1 == 0;
d) num % 0 == 2;
Answer:
b) num % 2 ==1;
Explanation:
Which code segment results in "true" being returned if a number is odd? Replace "MISSING CONDITION" with the correct code segment.
Can software work without Hardware? Why?
Answer:
No
Explanation:
Software requires hardware to run. Think about a computer, you can't have windows without having the computer. Software is programmed to run on hardware.
Question 9 (3 points)
When you add a row, where will it appear?
To insert the row, Click the Insert command on the Home tab. The new row will appear above the selected row.
What is a cell?A column and a row's intersection form a rectangular space known as a cell. The Cell Name or Reference, which is discovered by adding the Column Letter and the Row Number, is used to identify cells.
A row can be inserted either above or below where the cursor is. Then click the Table Layout tab after selecting the area where you wish to add a row. Click Above or Below under Rows & Columns. A row can be inserted either above or below where the cursor is.
Then click the Table Layout tab after selecting the area where you wish to add a row. Click Above or Below under Rows & Columns.
Therefore, it can be concluded that the raw appears in the home tab in the section of Row.
Learn more about cells here:
https://brainly.com/question/8029562
#SPJ2
1.The ___________ method adds a new element onto the end of the array.
A.add
B.input
C.append
D.len
2.A(n) ____________ is a variable that holds many pieces of data at the same time.
A.index
B.length
C.array
D.element
3.A(n) ____________ is a piece of data stored in an array.
A.element
B.length
C.array
D.index
4.Where does append add a new element?
A.To the end of an array.
B.To the beginning of an array.
C.To the middle of an array.
D.In alphabetical/numerical order.
5.Consider the following code that works on an array of integers:
for i in range(len(values)):
if (values[i] < 0):
values[i] = values [i] * -1
What does it do?
A.Changes all positives numbers to negatives.
B.Nothing, values in arrays must be positive.
C.Changes all negative numbers to positives.
D.Subtracts one from every value in the array.
6.Which of the following is NOT a reason to use arrays?
A.To quickly process large amounts of data.
B.Organize information.
C.To store data in programs.
D.To do number calculations.
7.Consider the following:
stuff = ["dog", "cat", "frog", "zebra", "bat", "pig", "mongoose"]
"frog" is ____________.
A.an index
B.an element
C.a list
D.a sum
8._____________ is storing a specific value in the array.
A.Indexing
B.Summing
C.Assigning
D.Iterating
9.Consider the following code:
stuff = ["dog", "cat", "frog", "zebra", "bat", "pig", "mongoose"]
print(stuff[3])
What is output?
A.zebra
B.bat
C.frog
D.['dog', 'cat', 'frog', 'zebra', 'bat', 'pig', 'mongoose']
10.Consider the following code:
tests = [78, 86, 83, 89, 92, 91, 94, 67, 72, 95]
sum = 0
for i in range(_____):
sum = sum + tests[i]
print("Class average: " + str((sum/_____)))
What should go in the ____________ to make sure that the code correctly finds the average of the test scores?
A.sum
B.val(tests)
C.len(tests)
D.len(tests) - 1
Answer:
1. append
2. array
3. elament
4. To the end of an array.
5. Changes all negative numbers to positives.
6. To do number calculations.
7. an elament
8. Assigning
9. zebra
10. len(tests)
Explanation:
got 100% on the test
45. Our goals are a reflection of our:
O values
O standards
O obstacles
O resources
beliefs
values and beliefs
Passive devices _____ require any action from the occupants. A. Do not B.Sometimes C.Rarely D.Occasionally
Answer:
D:
Explanation:
I think, but double check!
Have a nice life and I hope you get full marks on your test/paper/work!
:)
Using the Impress program, you can add multimedia files, including audio, image, and video files, to the presentation
by using
the Insert menu.
the Media menu.
the Edit menu.
the Add menu.
Mark this and return
Answer:
A. The Insert Menu
Explanation:
:)
Answer:
Edit menu
Explanation:
A hard drive cannot be partitioned until the device
is set.
Which search phrase is the most effective to find out about the most popular pizza chains worldwide in 2019?
A.
popular pizza chains in the world
B.
most popular AND pizza chains AND worldwide AND 2019
C.
the most popular pizzas “in the world today” AND 2019 AND chains
D.
2019 worldwide pizza chains “most popular in the world”
IT WOULDNT LET ME COMMENT ON ANOTHER POST WHAT THE RIGHT ANSWER IS BUT IT IS B
Answer:
B.
Explanation:
The search phrases most effective to find out about the 'most popular pizza chains worldwide in 2019,' are most popular AND pizza chains AND worldwide AND 2019.
The search phrases are those phrases that people enter on Go-ogle to search for webpages. These phrases are the words that will bring results accurately.
Therefore, option B is correct.
Answer:
Thanks chief, very cool of you.
Explanation:
What is the major difference between the intranet and extranet?
Question 36 options:
Intranets hold more importance
The major difference between the two, however, is that an intranet is typically used internally.
Extranets improve internal communications
None of the above
Explanation:
Iinternet is hudge graphicla network and intranet is small network as compare to internet
widow in respect to word processing
Answer:
To use the word widow.
Explanation:
She became a widow at the age of 95, due to the passing of her husband by natural causes.
10. Differentiate between equity share & preference share.
Answer:
Equity Shares are commonly called Common shares and have both advantages and disadvantages over Preference shares.
Equity shareholders are allowed to vote on company issues while preference shareholders can not.Preference shareholders get paid first between the two in the case that the company liquidates from bankruptcy. Preference shareholders get a fixed dividend that has to be paid before equity share dividends are paid. Preference shareholders can convert their shares to Equity shares but equity shareholders do not have the same courtesy.Preference shares can only be sold back to the company while equity shares can be sold to anybody.Use the drop-down menus to complete the sentences about the Calendar view Arrange command group.
Under the Calendar view, you will see your calendar as
by default.
When you create an appointment, you are creating an activity that will not send
to other people.
A meeting is an activity where individuals are invited and
are shared.
is an all-day incident placed on the calendar.
Answer:
Use the drop-down menus to complete the sentences about the Calendar view Arrange command group.
Under the Calendar view, you will see your calendar as
✔ monthly
by default.
When you create an appointment, you are creating an activity that will not send
✔ an invitation
to other people.
A meeting is an activity where individuals are invited and
✔ resources
are shared.
✔ An event
is an all-day incident placed on the calendar.
Explanation:
edge 2021
The complete sentences about the calendar view arrange command group are as follows:
Under the Calendar view, you will see your calendar as monthly by default. When you create an appointment, you are creating an activity that will not send an invitation to other people.A meeting is an activity where individuals are invited and resources are shared. An event is an all-day incident placed on the calendar.What do you mean by Calender view?Calendar view may be characterized as a type of feature within calendar software in which the user can choose from various formats in order to view the calendar more accurately and interestingly.
A calendar view lets a user view and interacts with a calendar that they can navigate by month, year, or decade. A user can select a single date or a range of dates. It doesn't have a picker surface and the calendar is always visible.
Command and control functions are performed through an arrangement of personnel, equipment, communications, facilities, and procedures employed by a commander in order to execute its functions.
Therefore, the complete sentences about the calendar view arrange command group are well mentioned above.
To learn more about Calendar view, refer to the link:
https://brainly.com/question/17524242
#SPJ2
Write two alternate functions specified below, each of which simply triples the variable count defined in main. These two functions are: a. Function tripleByValue that passes a copy of count by value, triples the copy and returns the new value.b. Function tripleByReference that passes count by reference via a reference parameter and triples the original value of count through its alias(i.e. the reference parameter)For example, if count
Answer:
Following are the code to this question:
#include <iostream>//header file
using namespace std;
int triplebyValue(int count)//defining a method triplebyValue
{
int x=count*3;//defining a variable x that multiply by 3 in the count
return x;//return value of x
}
void triplebyReference(int& count)//defining a method triplebyReference that hold count variable as a reference in parameter
{
count*=3;//multipling a value 3 in the count variable
}
int main()//main method
{
int count;//defining integer variable
count=triplebyValue(3);//use count to call triplebyValue method
cout<<"After call by value, count= "<<count<<endl;//print count value with message
triplebyReference(count);//calling a method triplebyReference
cout<<"After call by reference, count= "<<count<<endl;//print count value with message
return 0;
}
Output:
After call by value, count= 9
After call by reference, count= 27
Explanation:
In this code two methods "triplebyValue and triplebyReference" are declared, which accepts a count variable as a parameter, and in both multiply the count value by 3 and return its value.
Inside the main method, an integer variable "count" is declared that first calls the "triplebyValue" method and holds its value into count variable and in the next, the method value is a pass in another method that is "triplebyReference", and use print method to print both methods value with a message.
How do you guys feel about McCree’s new look in Overwatch 2? I personally like it but some people have a distaste towards it. I personally think it’s a step in the right direction and improves on how he used to look.
Answer:
Agreed.
Explanation:
I also laugh that you put this on Brainly.
I agree
Explanation:
It's lit, very lit
What can you use to make sure that you have no errors in Word Online?
Answer:
You can use grammarly. It woks amazingly!
Explanation:
The local library dealing with a major computer virus checked its computers and found several unauthorized programs, also known as ______.
A. Software
B. Hardware
C. Malware
D. Torrents
Answer:
malware
Explanation:
Answer: C. Malware
i just did it
Extend the functionality of cout by implementing a friend function in Number.cpp that overloads the insertion operator. The overloaded insertion operator returns an output stream containing a string representation of a Number object. The string should be in the format "The value is yourNum", where yourNum is the value of the integer instance field of the Number class.Hint: the declaration of the friend function is provided in Number.h.Ex: if the value of yourNum is 723, then the output is:
Answer:
// In the number.cpp file;
#include "Number.h"
#include <iostream>
using namespace std;
Number::Number(int number)
{
num = number;
}
void Number::SetNum(int number)
{
num = number;
}
int Number::GetNum()
{
return num;
}
ostream &operator<<(ostream &out, const Number &n)
{
out << "The value is " << n.num << endl;
return out;
}
// in the main.cpp file;
#include "Number.cpp"
#include <iostream>
using namespace std;
int main()
{
int input;
cin >> input;
Number num = Number(input);
cout << num;
return 0;
}
Explanation:
The main function in the main.cpp file prompts the user for the integer value to be displayed. The Number file contains defined functions and methods of the number class to set, get and display the "num" variable.
Suppose we want an error correcting code that will allow all single-bit errors to be corrected for memory words of length 15. 1. How many check bits are necessary?2. Assuming we are using the Hamming algorithm presented to design our error-correcting code, find the code word to represent the 12-bit information word: 100100011010
Answer:
15
Explanation:
01234567891011121314
if 100 KB file is stored in 2 MB folder how many files can be stored in the folder
Answer:
20 files.
Explanation:
Given the following data;
Size of file = 100 kilobytes.
Folder size (memory) = 2 megabytes.
Method 1
1000 kilobytes = 1 megabytes.
100 kilobytes = x megabytes
Cross-multiplying, we have;
1000x = 100
x = 100/1000
x = 0.1 mb
Now, to find the number of files that can be stored;
[tex] Number \; of \; files = \frac {Memory}{Size \; of \; each \; file} [/tex]
Substituting into the equation, we have;
[tex] Number \; of \; files = \frac {2}{0.1} [/tex]
Number of files = 20 files.
Method II
We know that;
1 kilobytes = 0.001 megabytes. 100 kilobytes = 0.1 megabytes. 1000 kilobytes = 1 megabytes. 2000 kilobytes = 2 megabytes.Substituting into the formula, we have;
[tex] Number \; of \; files = \frac {Memory}{Size \; of \; each \; file} [/tex]
Substituting into the equation, we have;
[tex] Number \; of \; files = \frac {2000}{100} [/tex]
Number of files = 20 files.
Build a class and a driver for use in searching your computer’s secondary storage (hard disk or flash memory) for a specific file from a set of files indicated by a starting path. Lets start by looking at a directory listing. Note that every element is either a file or a directory.
Introduction and Driver
In this assignment, your job is to write a class that searches through a file hierarchy (a tree) for a specified file. Your FindFile class will search a directory (and all subdirectories) for a target file name.
For example, in the file hierarchy pictured above, the file "lesson.css" will be found once in a directory near the root or top-level drive name (e.g. "C:\") . Your FindFile class will start at the path indicated and will search each directory and subdirectory looking for a file match. Consider the following code that could help you build your Driver.java:
String targetFile = "lesson.css";
String pathToSearch ="
C:\\WCWC"; FindFile finder = new FindFile(MAX_NUMBER_OF_FILES_TO_FIND);
Finder.directorySearch(targetFile, pathToSearch);
File Searching
In general, searching can take multiple forms depending on the structure and order of the set to search. If we can make promises about the data (this data is sorted, or deltas vary by no more than 10, etc.), then we can leverage those constraints to perform a more efficient search. Files in a file system are exposed to clients of the operating system and can be organized by filename, file creation date, size, and a number of other properties. We’ll just be interested in the file names here, and we’ll want perform a brute force (i.e., sequential) search of these files looking for a specific file. The way in which we’ll get file information from the operating system will involve no ordering; as a result, a linear search is the best we can do. We’d like to search for a target file given a specified path and return the location of the file, if found. You should sketch out this logic linearly before attempting to tackle it recursively.
FindFile Class Interface
FindFile(int maxFiles): This constructor accepts the maximum number of files to find.
void directorySearch(String target, String dirName): The parameters are the target file name to look for and the directory to start in.
int getCount(): This accessor returns the number of matching files found
String[] getFiles(): This getter returns the array of file locations, up to maxFiles in size.
Requirements
Your program should be recursive.
You should build and submit at least two files: FindFile.java and Driver.java.
Throw an exception (IllegalArgumentException) if the path passed in as the starting directory is not a valid directory.
Throw an exception if you've found the MAX_NUMBER_OF_FILES_TO_FIND and catch and handle this in your main driver. Your program shouldn't crash but rather exit gracefully in the unusual situation that we've discovered the maximum number of files we were interested in, reporting each of the paths where the target files were found.
The only structures you can use in this assignment are basic arrays and your Stack, Queue, or ArrayList from the previous homeworks. Do not use built-in data structures like Java's ArrayList. To accomplish this, put in the following constructor and method to your ArrayList, Stack, or Queue:
public ArrayList(Object[] input) { data = input;
numElements = input.length;
}
public Object get(int index) {
return data[index];
}
Answer:
hxjdbjebjdbdubainsinnsubd jdn dkdjddkndjbdubdb su djsbsijdnudb djdbdujd udbdj. djdjdjidndubdu dubdjdbdinndjndidn s dj dudbdjubd dujdjjdjdb djdbdjd udbdudb jndjdbudbdue idbd dudbid d dujejdunebudbdjdj d
what is the impact of technology to the mankind
Modern technology has revolutionized the way people all over the world communicate and interact. This revolution has led to a system of globalization which has fundamentally changed modern society in both good and bad ways.
The most important technological change over the past 20 years is the advent and popularization of the Internet. The Internet connects billions of people around the globe and allows a type of connectivity in ways which the world has never seen. Companies are able to do business with consumers from other countries instantaneously, friends and families are able to talk to one another and see each other regardless of location, and information sits at the fingertips of every person with a computer, tablet or phone.
Outside of the digital world, modern advances in machinery and science have also impacted everyday life. The modernization of travel has allowed humans to span more miles in their lifetime than at any point in history, and the advancement of medicine has given people longer lifespans.
While these changes have certainly been for the better, there are also plenty of negative results of modernization and globalization. Because the Internet streamlines massive amounts of information, it can easily be exploited. The loss of privacy is one of the most pressing issues in the modern world.
Technology has also had an impact on the natural world. Industrialization has led to the destruction of natural life and has possibly caused negative effects on our climate.
A five-year prospective cohort study has just been completed. the study was designed to assess the association between supplemental vitamin a exposure and mortality and morbidity for measles. the rr for incidence of measles was 0.75 and the rr for measles mortality was 0.5. Assume these RR are significant. Regarding the RR reported above, which statement is correct?
a. Exposure to vitamin A appears to protect against morbidity and mortality for measles.
b. Exposure to vitamin A appears to be a risk factor for morbidity and mortality for measles.
c. Exposure to vitamin A is not associated with morbidity and mortality for measles.
d. Exposure to vitamin A is a risk factor for morbidity and a protective factor for mortality for measles.
Answer:
Exposure to vitamin A appears to be a risk factor for morbidity and mortality for measles.
Explanation:
Word processing package allow users to?
Explanation:
allows users to create, edit, and print documents. It enables you to write text, store it electronically, display it on a screen, modify it by entering commands and characters from the keyboard, and print it.
The Westfield Carpet Company has asked you to write an application that calculates the price of carpeting for rectangular rooms. To calculate the price, you multiply the area of the floor (width times length) by the price per square foot of carpet. For example, the area of floor that is 12 feet long and 10 feet wide is 120 square feet. To cover that floor with carpet that costs $8 per square foot would cost $960. (12 × 10 × 8 = 960.) First, you should create a class named RoomDimension that has two FeetInches objects as attributes: one for the length of the room and one for the width. (You should use the version of the FeetInches class that you created in Programming Challenge 11 with the addition of a multiply member function. You can use this function to calculate the area of the room.) The RoomDimension class should have a member function that returns the area of the room as a FeetInches object. Next, you should create a RoomCarpet class that has a RoomDimension object as an attribute. It should also have an attribute for the cost of the carpet per square foot. The RoomCarpet class should have a member function that returns the total cost of the carpet. Once you have written these classes, use them in an application that asks the user to enter the dimensions of a room and the price per square foot of the desired carpeting. The application should display the total cost of the carpet.
Answer:
Answered below
Explanation:
#program is written in Java
class RoomDimension{
double length;
double width;
RoomDimension (double length, double width){
this.length = length;
this.width = width;
}
public double roomArea ( ){
return length * width;
}
}
class RoomCarpet{
RoomDimension rd;
double price;
RoomCarpet ( RoomDimension rd, double price){
this.rd = rd;
this.price = price;
}
public double totalCost( ){
double area = rd.roomArea();
return area * price;
}
}
Create a text file content.txt and copy-paste following text (taken from Wikipedia) into it: A single-tasking system can only run one program at a time, while a multi-tasking operating system allows more than one program to be running in concurrency. This is achieved by time-sharing, dividing the available processor time between multiple processes that are each interrupted repeatedly in time slices by a taskscheduling subsystem of the operating system. Now, write a C program that opens content.txt file for reading and calls fork() function. The child process in the program will print first 150 characters from the file and the remaining characters will be printed by the parent. However, at the
Answer:
s0 you should figure that out because I don't know how to
Explanation:
good luck
In the early days of the Internet, most access was done via a modem over an ________.
Question 10 options:
Analog telephone line
Fax
Telegram
None of the above
Answer:
analog telephone line
Explanation:
I hope this helps! :)
☁️☁️☁️☁️☁️☁️☁️☁️☁️