Character command shows the status.
Answer:
Output device.
Explanation:
An output device can be defined as a hardware device that typically receives processed data from the central processing unit (CPU) and converts these data into information that can be used by the end user of a computer system.
All of the output device of a computer are known as peripheral devices and they provide data (informations) to the end users in various formats such as video, audio, texts, images etc.
Since output devices are peripheral devices, they can be connected to the computer system wirelessly or through a wired-connection (cable).
Some examples of output devices are monitor, speakers, printer, projector etc.
Hence, when you hear music, read a printout, or view a video, you are using a computer's output device.
Answer:
In C++:
#include <iostream>
using namespace std;
int main(){
string fname,lname; int num;
cout<<"Firstname: "; cin>>fname;
cout<<"Lastname: "; cin>>lname;
cout<<"4 digits: "; cin>>num;
string login = lname;
if(lname.length()>=5){
login = lname.substr(0, 5); }
login+=fname.substr(0,1)+to_string(num%100);
cout<<login;
return 0;
}
Explanation:
See attachment for explanation where I used comments to explain each line
Answer:
total = 0
for i in range(5):
score = int(input("Enter a score: "))
total += score
average = total / 5
print("The average is " + str(average))
Explanation:
*The code is in Python.
Initialize the total as 0
Create a for loop that iterates five times. Inside the loop, ask the user to enter a score. Add the score to the total (cumulative sum)
After the loop, calculate the average, divide the total by 5
Print the average