Write a program num2rome.cpp that converts a positive integer into the Roman number system. The Roman number system has digits I 1 V 5 X 10 L 50 C 100 D 500 M 1,000 Numbers are formed according to the following rules: a. Only numbers 1 to 3,999 (inclusive) are represented. b. As in the decimal system, the thousands, hundreds, tens, and ones are express separately. c. The numbers 1 to 9 are expressed as I 1 II 2 III 3 IV 4 V 5 VI 6 VII 7 VIII 8 IX 9 As
Answer:
Explanation:
#include <stdio.h>
int main(void)
{
int num, rem;
printf("Enter a number: ");
scanf("%d", &num);
printf("Roman numerals: ");
while(num != 0)
{
if (num >= 1000) // 1000 - m
{
printf("m");
num -= 1000;
}
else if (num >= 900) // 900 - cm
{
printf("cm");
num -= 900;
}
else if (num >= 500) // 500 - d
{
printf("d");
num -= 500;
}
else if (num >= 400) // 400 - cd
{
printf("cd");
num -= 400;
}
else if (num >= 100) // 100 - c
{
printf("c");
num -= 100;
}
else if (num >= 90) // 90 - xc
{
printf("xc");
num -= 90;
}
else if (num >= 50) // 50 - l
{
printf("l");
num -= 50;
}
else if (num >= 40) // 40 - xl
{
printf("xl");
num -= 40;
}
else if (num >= 10) // 10 - x
{
printf("x");
num -= 10;
}
else if (num >= 9) // 9 - ix
{
printf("ix");
num -= 9;
}
else if (num >= 5) // 5 - v
{
printf("v");
num -= 5;
}
else if (num >= 4) // 4 - iv
{
printf("iv");
num -= 4;
}
else if (num >= 1) // 1 - i
{
printf("i");
num -= 1;
}
}
return 0;
}
Modify the statistics program from this chapter so that client programshave more flexibility in computing the mean and/ or standard deviation.Specifically, redesign the library to have the following functions:mean(nums) Returns the mean of numbers in nums.stdDev(nums) Returns the standard deviation of nums.meanStdDev (nums) Returns both the mean and standard deviation of nums.
Answer and Explanation:
Using Javascript:
function mean(nums){
var array_numbers= new array(nums);
var meanofNums= array_numbers.reduce()/array_numbers.length;
Console.log(meanofNums);
}
Function Std(nums){
var OurArray= new Array(nums);
var meanOfnums= mean(nums);
var i;
for(i=0; i<=OurArray.length; i++){
OurArray[i]= OurArray[i]-meanOfnums*OurArray[i]-meanOfnums;
}
var al_stdOfnums= OurArray.reduce()/OurArray.length;
var stdOfnums= Math. sqrt(al_stdOfnums);
Console.log(stdOfnums);
}
function meanStdDev (nums){
mean(nums);
Std(nums);
}
/*From the code above, we have defined functions and used them in the last function definition meanStdDev (nums), making for code reusability. In defining the functions, we have followed the formulas for calculating mean and standard deviations and implemented in that order. Notice how we used a for loop in std(nums) function definition to iterate through the elements of the array nums, squaring each value and reassigning a new value for each element(using index value) in the array. We then added these values in array using reduce method, dividing by array length and square rooting the value using the math object method sqrt().*/
how are computer used in education and entertainment?
Answer:
In Education:It improves students ability to learn fast as it helps us get information or research faster.It saves time.
In Entertainment:
It helps in movies by helping the producer to create special effects for some acts in a movie by making the impossible possible in movies.
ou use productivity apps on your iPad tablet device while traveling between client sites. You're concerned that you may lose your iPad while on the road and want to protect the data stored on it from being compromised. Currently, your iPad uses a 4-digit PIN number for a passcode. You want to use a more complex alpha-numeric passcode. You also want all data on the device to be erased if the wrong passcode is entered more than 10 consecutive times. What should you do
Answer:
Enable the Erase data optionDisable the simple passcode optionExplanation:
Most smartphone security experts agree that one way to prevent unauthorized access to one's iPad is to enable the erase data feature. Enabling this feature is believed to allow the possibility of all data on the device to be erased if a wrong passcode is entered after a specified number of times.
Of course, it is also possible to set a complex alphanumeric passcode, however, you'll need to first disable the simple passcode option.
On SnapI blocked someone, unblocked them and I want to add them again but I forgot their username. Is there anything I can do? Does snap have a list of like my former friends or people I’ve blocked?
Answer:
There is no list of people you had blocked formerly, however you should have seen their username when unblocking them? That's the only way I can think to find their user. Maybe if you have a friend who knows their username, you can get it that way. Or if you remember just a bit of it or their first/last name, you can try searching that.
Which tab on the ribbon is used to access the global Access 2016 options?
Home
Create
Database Tools
File
Explanation:
the answer is Database Tools
explain the working system of computer systems with examples
,I don't know you all about computer
computer in country development explain explain explain in presentation.
Answer:
A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern computers can perform generic sets of operations known as programs. These programs enable computers to perform a wide range of tasks. A computer system is a "complete" computer that includes the hardware, operating system (main software), and peripheral equipment needed and used for "full" operation. This term may also refer to a group of computers that are linked and function together, such as a computer network or computer cluster
Consider the following class interfaces:
class Teacher
{
public:
Teacher();
Teacher(string new_name);
string get_name() const;
private:
string name;
};
class MathsTeacher : public Teacher
{
public:
MathsTeacher();
MathsTeacher(string new_qualification, string new_name);
void display_data() const;
private:
string qualification;
};
int main()
{
Teacher t1, t2("John");
MathsTeacher mt1, mt2("TopLevel", "Sarah");
t1 = mt1;
t1 = t2;
mt1 = mc2;
mt1 = t1;
return 0;
}
Which one of the preceding assignment statements in the function main() would slice away the data of the derived class object?
A. c1 = ac1
B. c1 = c2
C. ac1 = ac2
D. ac1 = c1
Answer:
class teacher and student I didn't actually read it but I think it is class student
What is the device that converts the signals to and from the wires so that the data can be sent and received by the computer?
A
domain name system
B
network
C
router
D
IP address
Answer:
E. Modem
Explanation:
A network comprises of two or more interconnected devices such as computers, routers, switches, smartphones, tablets, etc. These interconnected devices avail users the ability to communicate and share documents with one another over the network.
In order for a network to exist or be established, the devices must be turned (powered) on and interconnected either wirelessly or through a cable (wired) connection.
In Computer Networking, a node is the physical device that make up a network and are capable of sending, receiving, creating and storing data in communication.
Examples of network nodes are routers, hubs, computer, switches, smartphone, printers, modem, etc.
A modem is a networking device that converts the signals to and from the wires such as a telephone line, so that the data can be sent and received by the computer.
Basically, a modem is an abbreviation for modulator and demodulator and as such it is designed to convert signal from one network device to signals that another network device such as a computer can understand or read.
When sending a signal (data) over a network, a modem converts (modulate) digital data signal to an analogue signal and transmits it over a telephone line or other communication lines. Also, when receiving an analogue signal, a modem converts (demodulate) the signal to a digital data signal.
10 ICTs that encourage reading...?
10 ICTs that encourage reading are given below:-
laptop / desktopprojectorphotocopierprinterIpadswebboardsinteractive white boardmicrophoneTablets Internet .Hope it is helpful to you
full form of GHz ,CAI,CBT,ECG,GUI,ICU in computer
Answer:
GHz - Gigahertz
CAI - Computer-assisted instruction
CBT - Computer Based Test
ECG - Electrocardiogram
GUI - Graphical User Interface
ICU - Interface Converter Unit
Explanation:
Required
The full form of the given terms
The full forms have been stated in the answer section. Brief explanation is as follows;
GHz - Gigahertz
The clock speed of a computer
CAI - Computer-assisted instruction
Used to aid learning process; it encompasses texts, audios and videos.
CBT - Computer Based Test
An assessment done with the aid of a computer
ECG - Electrocardiogram
Used to record heart impulses
GUI - Graphical User Interface
An interface that allows interaction between the user and the device through visuals.
ICU - Interface Converter Unit
A conversion device in the computer used to transfer data between computers.
What are some college or high school social networking sites?
I already know of FB, LinkedIn, IG, Twitter, Snap but are there any other cool platforms?
Answer: discord mainly if you're into games
Explanation:
what are binary code
Answer:
Binary code is a coding system using binary digits 0 and 1 to represent a letter, digit, or other characters in a computer or other electronic device. The binary code assigns a pattern of binary digits, also known as bits, to each character, instruction, etc.
Elsa wants to save her work at the office to be continued at home either on a pen drive or CD. Outline three reasons why she will choose the pen drive over the CD
Answer:
Pen Drive offers more accessibility
Not every device is equipped with a CD player but every device has a USB port for a pen Drive. Saving on the pen Drive will therefore enable the data to be more accessible.
Pen Drive has more space.
CDs usually have a storage capacity of below a gigabyte whilst pen drives can reach up to 2 terabytes thereby offering exponentially more space to save data.
Safety of Data
CDs are more prone to damage as data could be lost if the CD is scratches. Pen Drives on the other hand are encased in an outer case that protects the data.
The ALIGN attribute of the P-tag cannot take what value right or left or justify or center?
The align attribute of p tag can not take 'much' value
#LETS STUDY#BRAINLEST LOVE❣️
Your organization has an Active Directory domain. One of the users, Bill, should not have read access to a folder named Accounting. The Accounting folder is shared on a network server, on a partition formatted as NTFS. Which of the following statements best describes how to stop Bill from having read access to the folder without impacting any other users on the network?
A. Remove Bill from all domain groups that have access to the Accounting folder.
B. Deny read access to the Accounting folder for Bill through local access security.
C. Deny read access to the Accounting folder for any group that Bill is a member of.
D. Deny read access to the Accounting folder for Bill through shared access security.
The statement that best describes how to stop Bill from having read access to the folder is option D: Deny read access to the Accounting folder for Bill through shared access security.
What is read access permission?Owners and administrators are known to be the people that can alter the read access permissions for streams and others.
Hence, based on the above scenario, The statement that best describes how to stop Bill from having read access to the folder is option D: Deny read access to the Accounting folder for Bill through shared access security.
Learn more about read access from
https://brainly.com/question/27175118
#SPJ1
Which of the following is an example of a network layer (layer 3) protocol?
Answer:
IP
Explanation:
Well, when you say following, I'm guessing you mean:
UDP
TCP
Ethernet
IP
The answer is IP because, "The most significant protocol at layer 3 (also called the network layer) is the Internet Protocol, or IP. IP is the standard for routing packets across interconnected networks--hence, the name internet." - (ibm.com)
How many characters should a strong password have? four six eight ten
Answer:
I say it have to be aleast 8 to complete a strong password
Explanation:
it's common sense
Answer:
8
Explanation:
The more the better but ten too much
Elsa wants to save her work at the office to be continued at home either on a pen drive or CD. Outline three reasons why she will choose the pen drive over the CD
Answer:
More space
Pen drives generally have more storage capacity than CDs with CDs usually having just around 700 Megabytes for storage. Pen drives on the other hand can reach up to 2 Terabytes of data storage capacity. If the file she needs to save is high, Elsa should use the pen drive.
Scratch resistant
CDs can be scratched on the way to the house and lose some data or make it harder to extract. Pen drives do not have such problems are they are encased in an outer casing.
Portable and Accessible.
Pen drives are easy to carry which makes them portable and they are easier to use because a lot of computers do not have a CD drive but every computer has a port for a pen drive therefore making data in pen drives more accessible.
Select the item that best represents technology transfer?
Newtonian telescope
Magnetic Compass
Printing Press
Answer:
Printing Press
Explanation:
Technology transfer is the simple process of sharing or dissemination of information from person to person (or from one organisation to another)
Therefore, the item that best represents technology transfer from the given answer choices is the printing press.
This is because, the printing press helped to print paper containing information which was sent from one location to another.
Helllllllllppppppppppp
Answer:
9
Explanation:
"++" at the beginning increases your "x" by 1 before using it.
if it placed after your variable, it will increase it after your program used it.
The CPU is considered to be the............of a computer system
Answer:
The Central Processing Unit (CPU) is the brain or main source of the computer system.
how do I write a python function that takes a list and returns a new list with unique elements from the first list?
Answer:
Explanation:
The following Python program is a function that takes in a list as a parameter. It then uses the built-in dict class in Python to turn the input list into a dictionary and we call the fromkeys() method to remove all duplicate values. Then we turn the dictionary back into a list and save it into the variable called uniqueList. Finally, we return uniqueList back to the user. A test case has been created and the output can be seen in the attached image below.
def removeDuplicates(inputList):
uniqueList = list(dict.fromkeys(inputList))
return uniqueList
state 4 & circumstances under which warm
booting of a computer may be necessary
Answer:
to close an open application
Write a Raptor program that will generate a random number between 1 and 10; do not display the randomly generated number. Let the user guess within 3 tries what the random number is. Display hints to help the user, for example "Your guess was too high!". Display appropriate messages based on each try, for example, "1 remaining try" or "You guessed correctly!"
Answer:
Using javascript, explanation with javascript comment
Explanation:
function guessNumber(){
var randomize= math.random()*10;
var roundrand= math.floor(randomize);
var getInput= prompt("guess number from 1 to 10");
var x= 3;
do(
if(getInput>roundrand){
Console.log("your guess is too high");
guessNumber();
}
if(getInput<roundrand){
Console.log("your guess is too high");
guessNumber();
}
else{
Console.log("you are correct pal!");
break;
}
)
while(x<=3)
}
/*Observe that we have used a recursive function that calls the function guessNumber again inside the function definition if the input fails the if condition and doesn't guess correctly. It checks for a correct number 3 times with the do... while loop and breaks out of the function once the user enters a correct input.*/
Which option is used to insert a table in PowerPoint from another Office application?
In the Insert Object dialog box, choose Create from file.
In the Design tab, choose the Table Styles option.
In the Insert Table dialog box, choose Insert Table.
In the Layout tab, choose the Merge option.
Answer: In the Insert Object dialog box, choose Create from file.
Explanation:
To insert a table into PowerPoint from another Office application, go to the Insert Tab. In the Text ribbon on the far right, you will see "Object" next to Equation.
After clicking on that, select the "Create from File" option. It will allow you to browse a file you want to import from. PowerPoint will import the data from this file.
What is the difference between a hard drive and a tape drive? Hard drives use magnetic heads and are fast to write data; tape drives write to disks and are fast to retrieve data. Hard drives write to disks and are fast to retrieve data; tape drives use magnetic heads and are fast to write data. Hard drives use magnetic heads and are best for archival data; tape drives write to disks and are used for ongoing backups. Hard drives write to disks and are used for ongoing backups; tape drives use magnetic heads and are best for archival data.
Answer:
A tape drive provides sequential access storage, unlike a hard disk drive, which provides direct access storage. A disk drive can move to any position on the disk in a few milliseconds, but a tape drive must physically wind tape between reels to read any one particular piece of data.
Explanation:
Architecturally tape drives are sequential storage, meaning that if you need to access some data at the end of the tape you needed to seek to the end and retrieve it. This can take seconds or minutes. Disks, OTOH are random access. Some hard drives use rotating media and movable heads , so the seek times are instantaneous , at least compared with tape drives. However, like tapes, there is a big advantage to using a rotating hard drive as sequential storage. It takes time, measured in milliseconds, for a head to move to another track. So traditionally, random access is much slower than sequential access.
SSDs have no internal moving parts so random access occurs in the same time frame as sequential access. Moreover, these drives usually have very high performance. For example, they can saturate a SATA data link, meaning that the SATA connection to the motherboard is now a bottleneck in disk access.
At one time tape drives were very popular. They were a low-cost alternative to using disks as backup. They were especially useful when IBM invented the Winchester “fixed” drive. This meant that the hard drive is fixed within its enclosure like they are today. Prior to this one could remove the drive pack and replace it. This was helpful when upgrading to a new version of the operating system as it was simple to replace the older drive pack should there be a problem.
Tape drives can be used in larger data centers, due to the fact that tape volumes can be removed and replaced so that the actual tape drive can backup many disk sets. Also the tape volumes can be stored off-site or in a fire-proof vault so this is valuable in a data recovery scenario.
The processor's ____ controls the timing of all the computer operations?
Answer:
system clock.
Explanation:
A computer can be defined as an electronic device that is capable of receiving of data in its raw form as input and processes these data into information that could be used by an end user.
The central processing unit (CPU) is typically considered to be the brain of a computer system. It is the system unit where all of the processing and logical control of a computer system takes place.
Additionally, the component of the central processing unit (CPU) that controls the overall operation of a computer is the control unit. It comprises of circuitry that makes use of electrical signals to direct the operations of all parts of the computer system. Also, it instructs the input and output device (I/O devices) and the arithmetic logic unit on how to respond to informations sent to the processor.
The processor's system clock controls the timing of all the computer operations.
This ultimately implies that, the central processing unit (CPU) of a computer depends or relies on the system clock which is typically designed to control the timing of all the operations performed by a computer.
Basically, the system clock is a small quartz crystal circuit and it measures the timing of a computer with respect to its operations.
Write a program that allows the user to continuously input the value n until a negative number is entered
Answer:
Written in C++
Explanation:
#include <iostream>
using namespace std;
int main()
{
int n;
while(true)
{
cin>>n;
if(n>=0)
continue;
break;
}
return 0;
}