Answer:
# Initialize the values
overtime_pay = 0
deduction = 0
# Ask the user to enter hours and shift
hours = int(input("Enter hours worked: "))
shift = int(input("Enter shift[1/2/3]: "))
# Check the shift. If it is 1, set the hourly rate as 17
# If the shift is either 2 or 3, ask for participation to retirement plan
# If shift is 2, set the hourly rate as 18.50
# If shift is 3, set the hourly rate as 2
if shift == 1:
horly_pay_rate = 17
elif shift == 2 or shift == 3:
retirement = int(input("Participate in the retirement plan? [1 for yes, 2 for no]: "))
if shift == 2:
horly_pay_rate = 18.50
if shift == 3:
horly_pay_rate = 22
# Check the hours. If it is smaller than or equal to 40, calculate only regular pay
# If hours is greater than 40, calculate regular and overtime pay
if hours <= 40:
regular_pay = (hours * horly_pay_rate)
elif hours > 40:
regular_pay = (40 * horly_pay_rate)
overtime_pay = (hours - 40) * (horly_pay_rate * 1.5)
#calculate total pay
total_pay = regular_pay + overtime_pay
# Check the retirement. If it is 1, calculate and apply deduction
if retirement == 1:
deduction = total_pay * 0.03
net_pay = total_pay - deduction
else:
net_pay = total_pay
#print the results
print("Hours worked: " + str(hours))
print("Shift: " + str(shift))
print("Hourly pay rate: " + str(horly_pay_rate))
print("Regular pay: " + str(regular_pay))
print("Overtime pay: " + str(overtime_pay))
print("Total of regular and overtime pay: " + str(total_pay))
print("Retirement deduction: " + str(deduction))
print("Net pay: " + str(net_pay))
Explanation:
*See the comments in the code
To specify your preferred colors, fonts, and effects for a document, which of the following should be done?
1.Create custom theme fonts
2.Create custom theme
3.Create a custom paragraph style
4.Create a custom character style
Answer: crest custom theme
Explanation:
Answer:
crest custom theme
Explanation:
Discuss the Von-Neumann CPU architecture?
The Von Neumann architecture is a traditional CPU design named after John von Neumann and widely implemented since the mid-20th century.
What is the Von-Neumann CPU architecture?Basis for modern computers, including PCs, servers, and smartphones. Von Neumann architecture includes components for executing instructions and processing data. CPU is the core of Von Neumann architecture.
It manages operations, execution, and data flow in the system. Von Neumann architecture stores both program instructions and data in a single memory unit. Memory is organized linearly with each location having a unique address. Instructions and data are stored and retrieved from memory while a program runs.
Learn more about Von-Neumann CPU architecture from
https://brainly.com/question/29590835
#SPJ1
If columns are labelled alphabetically, what will be the label for the cell in row 1, column 16,384?
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Hope this helps!
Which THREE of the following are benefits of using electronic spreadsheets over paper spreadsheets?
easier updating of data
easier collection of data from data sources such as polls
the ability to analyze data using math formulas
the ability to sort and filter data
quicker data entry
Answer:
Easier updating of data,the ability to sort and filter data,the ability to analyze data using math formulas.
Explanation:
They are the only three that make since
Answer:
The answers are:
Easier updating of data
The ability to analyze data using math formulas
The ability to sort and filter data
Explanation:
I got it right on the Edmentum test.
The groups within a tab are collectively
known as?
Answer:
the ribbon
Explanation:
Commands are organized in logical groups, which are collected together under tabs. Each tab relates to a type of activity, such as formatting or laying out a page. To reduce clutter, some tabs are shown only when needed.
Which of the following statements is something the operations system of a computer is responsible for doing? Managing memory allocation for all apps.
Providing a way for the user to create text docs
allowing the user to access the internet.
Allowing the user to write programs
Explanation:
took the test
The statement "Managing memory allocation for all apps" is something the operations system of a computer is responsible for doing. So, option 1 is true.
Ask about the statements that are something the operations system of a computer is responsible for doing.
The operating system handles memory management, ensuring that different applications have appropriate memory allocation and can efficiently utilize system resources.
It is not directly responsible for providing a way to create text documents, accessing the internet, or allowing the user to write programs, although these functionalities can be facilitated by certain applications or tools within the operating system.
Therefore, option 2 is true.
To know more about the operating system visit:-
https://brainly.com/question/30692693
#SPJ3
Your digital footprint says a lot about you, but not everything is true or accurate. When you're a high school or college student, you may not think about the impact your digital life will have on future employment. Some potential employers will search the web looking for information on job applicants.
Is it ethical for a potential employer to use the Internet this way?
Answer:
yes
Explanation:
cuz im yearz old
Write an assembly code
Read 1 byte number (between 0 and 9). Write a program that prints:
It's ODD
if input is odd and prints
It's EVEN if input is even
; Read input byte
MOV AH, 01h ; Set up input function
INT 21h ; Read byte from standard input, store in AL
; Check if input is even or odd
MOV BL, 02h ; Set up divisor
DIV BL ; Divide AL by BL, quotient in AL, remainder in AH
CMP AH, 00h ; Compare remainder with zero
JNE odd ; Jump to odd if remainder is not zero
JMP done ; Jump to done if remainder is zero
odd: ; Odd case
MOV DX, OFFSET message_odd ; Set up message address
JMP print
even: ; Even case
MOV DX, OFFSET message_even ; Set up message address
print: ; Print message
MOV AH, 09h ; Set up output function
INT 21h ; Print message
done: ; End of program
What’s the output of this code?
Answer:
1
Explanation:
console.log: mystery isn't anything necessary because it doesn't have anything to do with the code. The only option for this is 1 because the mystery says a, b and c. As this c < a & c > b gives the number 1.
Have a wonderful day! :-)
Overview C++
This milestone will help prepare you for Project One.
In this milestone, you will continue working on a task for ABC University. ABC University is looking for software that will help their computer science advisors access course information for students. To do this, you will utilize what you have learned about data structures. In this milestone, you will create pseudocode for the Computer Science department at ABCU. This code will demonstrate your ability to import data from a file and store it in the tree data structure.
Prompt
For this milestone, you will be creating pseudocode for loading data into the tree data structure. There will be no programming work in this milestone; you will be developing pseudocode that will help you implement your design in a future milestone. Also note that throughout this milestone we are going to use the word "course" to refer to the courses in the curriculum versus "class," which has another meaning in object-oriented programming.
For this milestone, you will:
Design pseudocode to define how the program opens the file, reads the data from the file, parses each line, and checks for file format errors. The Course Information document, linked in the Supporting Materials section, contains all the information about all of the courses required in the Computer Science curriculum for ABCU. Each line will consist of the information about a single course, including the course number, title, and prerequisites. The Course Information document includes the course data and a diagram of how the program will execute.
Your pseudocode will need to validate the sample file to ensure it is formatted correctly and check for the following:
Ensure there are at least two parameters on each line (some courses may not have any prerequisites).
Ensure any prerequisite that is provided on a line exists as a course in the file. In other words, any prerequisite at the end of a line must have another line in the file that starts with that courseNumber.
Design pseudocode to show how to create course objects and store them in the appropriate data structure. Your pseudocode should show how to create course objects so that one course object holds data from a single line from the input file. Knowing the file format will help you parse and store each token of data into the appropriate course object instance variable. You should store each course object into the vector data structure. Once the entire file has been processed, the vector data structure will have multiple course objects, one per line in the file.
Hint: A loop will be needed to process all lines from the file.
Design pseudocode that will print out course information and prerequisites. In the Pseudocode Document, pseudocode for printing course information using a vector data structure is provided as an example. Develop the pseudocode for printing course information for the tree data structures using the base code that has been provided.
What to Submit
To complete this project, you must submit the following:
Pseudocode
Your submission should include your completed pseudocode formatted as a Word document.
Supporting Materials
The following resources will support your work on the milestone:
Course Information
This document outlines the courses and pathway you will be designing for.
Pseudocode Document
This document provides sample pseudocode and a runtime analysis that you will use to support your work in this milestone. You already began work on the vector and hash table portions of this document during a prior milestone. For this milestone, you should add to the work you completed by writing in the tree portion of the document you submitted previously. Note that the original Pseudocode Document is only provided again for reference.
In this milestone, you will create pseudocode for loading data into the tree data structure. This pseudocode will validate the input file and create course objects which are then stored in the vector data structure. The pseudocode will also print out course information and prerequisites.
You will write pseudocode in this milestone to load data into the tree data structure. This pseudocode will check the input file for validity, ensuring that each line has at least two parameters and that any prerequisites at the end of lines are present in the file as courses. Also, the pseudocode will produce study materials and save them in the proper vector data structure. One course object per file line will be present in the vector data structure once the full file has been processed. Also, the pseudocode will print out prerequisites and information on the courses. You can use this pseudocode to demonstrate your comprehension of data structures and help you get ready for project one.
Learn more about Pseudocode here:
brainly.com/question/13208346
#SPJ4
When dividing it’s total debt by total equity what’s a company trying to measure
Answer:
A business's debt-to-equity ratio, or D/E ratio, is a measure of the extent to which a company can cover its debt. It is calculated by dividing a company's total debt by its total shareholders' equity. The higher the D/E ratio, the more difficult it may be for the business to cover all of its liabilities.
When dividing its total debt by total equity, a company is trying to measure its leverage or debt-to-equity ratio.
What does this indicate?This ratio indicates the proportion of debt used to finance the company's assets compared to its equity. It helps assess the company's financial risk and its ability to meet its debt obligations.
A higher debt-to-equity ratio implies higher financial leverage and indicates that the company relies more on debt financing, which can increase its financial risk. Conversely, a lower ratio suggests a lower reliance on debt and a stronger financial position.
Read more about debt-to-equity ratio here:
https://brainly.com/question/27993089
#SPJ2
Need help with Exercise 5
The program above is one that entails a person to make program in a programming code to go through the content from an input record.
What is the code about?Making a computer program program includes composing code, testing code and settling any parts of the code that are wrong, or investigating. Analyze the method of composing a program and find how code editor program can make that prepare less demanding
Therefore, In Windows, to run a program, one have to double-click the executable record or double-click the shortcut symbol indicating to the executable record. If they have got a hard time double-clicking an symbol, they need to be able tap the symbol once to highlight it and after that press the Enter key on the console.
Learn more about code from
https://brainly.com/question/26134656
#SPJ1
CST-105: Exercise 5
The following exercise assesses your ability to do the following:
•
Use and manipulate String objects in a programming solution.
1. Review the rubric for this assignment before beginning work. Be sure you are familiar with the criteria for successful completion. The rubric link can be found in the digital classroom under the assignment.
2. Write a program that reads text from a file called input.in. For each word in the file, output the original word and its encrypted equivalent in all-caps. The output should be in a tabular format, as shown below. The output should be written to a file called results.out.
Here are the rules for our encryption algorithm:
a.
If a word has n letters, where n is an even number, move the first n/2 letters to the end of the word. For example, 'before' becomes 'orebef
b. If a word has n letters, where n is an odd number, move the first (n+1)/2 letters to the end of the word. For example: 'kitchen' becomes 'henkitc'
Here is a sample run of the program for the following input file. Your program should work with any file, not just the sample shown here.
EX3.Java mput.ix
mputz.txt w
1 Life is either a daring adventure or nothing at all
Program output
<terminated> EX3 [Java Application] CAProg
Life
FELI
is
SI
either
HEREIT
a
A
daring
INGDAR
adventure
TUREADVEN
or
RO
nothing
INGNOTH
at all
TA
LAL
3. Make a video of your project. In your video, discuss your code and run your program. Your video should not exceed 4 minutes.
Submit the following in the digital classroom:
A text file containing
O
Your program
O
A link to your video
name the steps to turn on a computer properly
Answer:
Check that the computer is connected to power, and is powered on.
Make sure that your keyboard and mouse are plugged in.
Check that the monitor (screen) is plugged into the computer using its display cable.
Ensure that the monitor is connected to power and is turned on.
Explanation:
25 Points !! HELP ASAP . DUE TOMORROW MORNING .
Imagine you are scrolling through your social media and you see these two links, which one would you click on? Why? Explain answer 2-3 sentences long .
Answer:
The Associated Press
Explanation:
Out of the two options presented, The Associated Press caught my attention more due to its compelling content. The content displayed is visually appealing and likely to pique one's curiosity, motivating one to seek further information.
Sarah is a detall-oriented programmer. While testing her program, what other skill would she have to apply in order to detect all bugs?
Use the web to learn how to use the LocalDate Boolean methods isBefore(), isAfter(), and equals(). Use your knowledge to write a program that prompts a user for a month, day, and year, and then displays a message specifying whether the entered day is in the past, is today (the current date), or is in the future.
import java.util.*;
import java.time.LocalDate;
public class PastPresentFuture2
{
public static void main(String args[])
{
int mo,da,yr;
LocalDate today=LocalDate.now();
System.out.println("Program to find if the given date is in past, present or future::");
Scanner input=new Scanner(System.in);
//taking inputs from console and storing them in three variables.
System.out.print("Enter month::");
mo=input.nextInt();
System.out.print("Enter day::");
da=input.nextInt();
System.out.print("Enter year::");
yr=input.nextInt();
//creating a LocalDate object and initializing it to null;
LocalDate inputDate=null;
try
{
/*we are using the 3 variables and converting it into a date object to compare it with today's date */
inputDate = LocalDate.of(yr,mo,da);
}
catch(Exception ex)
{
/*if the entered day,month & year are not converted to a date object because of invalid entry of any values, we are stopping the program.*/
System.out.println("You have made invalid entries, please try again !!");
System.exit(0);
}
/*if the date object is created after proper entries, we are using the built-in functions to compare it the today's date object*/
System.out.print("The date you entered is ");
if(inputDate.isBefore(today))
System.out.println("in the past.");
else
if(inputDate.isAfter(today))
System.out.println("in the future.");
else
if(inputDate.equals(today))
System.out.println("the current date.");
}
}
Answer:
Explanation:
The code provided is already taking in the input and comparing it to the current date using the methods isBefore(), isAfter(), and equals(). It works perfectly and did not need any changes to the code. As you can see from the attached pictures below, every scenario works as intended. If the format is not correct and the date object is not able to be created then it prompts an error message and exits the program as intended.
import java.util.*;
import java.time.LocalDate;
class PastPresentFuture2
{
public static void main(String args[])
{
int mo,da,yr;
LocalDate today=LocalDate.now();
System.out.println("Program to find if the given date is in past, present or future::");
Scanner input=new Scanner(System.in);
//taking inputs from console and storing them in three variables.
System.out.print("Enter month::");
mo=input.nextInt();
System.out.print("Enter day::");
da=input.nextInt();
System.out.print("Enter year::");
yr=input.nextInt();
//creating a LocalDate object and initializing it to null;
LocalDate inputDate=null;
try
{
/*we are using the 3 variables and converting it into a date object to compare it with today's date */
inputDate = LocalDate.of(yr,mo,da);
}
catch(Exception ex)
{
/*if the entered day,month & year are not converted to a date object because of invalid entry of any values, we are stopping the program.*/
System.out.println("You have made invalid entries, please try again !!");
System.exit(0);
}
/*if the date object is created after proper entries, we are using the built-in functions to compare it the today's date object*/
System.out.print("The date you entered is ");
if(inputDate.isBefore(today))
System.out.println("in the past.");
else
if(inputDate.isAfter(today))
System.out.println("in the future.");
else
if(inputDate.equals(today))
System.out.println("the current date.");
}
}
What are some of the issues that create conflict in the future and why?
Answer:
Some of the reasons for future conflict between nations could be:
Explanation:
1: water wars, this is something possibly brewing between Ethiopia and Egypt with Sudan being on Ethiopia's side as the dam Ethiopia plans to build which would take a lot of Egypt's water would also power Sudan with electricity. Oh and something frightening could happen as China is damming India's major rivers which could lead to a world war or India becoming a Chinese vassal and massive amounts of displaced and starving people either way.
2: a global economic drop: this will severely impact the economies of many countries, especially countries in the middle of industrialization in Africa which are very fragile, I will give it a few decades to fully blow up there.
3:Competing interests, ethnic and international for example in Central Asia there are a lot of competing influences and something could happen there but thing is wars because of what I just mentioned are already happening, look at Syria with the "moderate" rebels, between Armenia and Azerbaijan we have had a conflict which had several geopolitical implications and reasons it went as it did, currently Libya is in a proxy war too, and recently Ethiopia has had conflicts within a Northern region which are heavily ethnic-based and could lead to an Ethiopian civil war if the government does not manage to solve this, which would also mean the first war I mentioned would be delayed or prevented trough another bloody war.
4: an incident: many wars have started because of incidents escalating, so watch out for it, for example earlier this yea- oh it's been a year already since Qasem Soleimani was assasinated , however luckily nothing happened then.
Either way we're gonna have more wars before world peace and mercenaries are becoming more popular like Turkey and more countries are using in proxy wars and another thing you should watch out for is the first use of robots in war and hope that they distinguish between regular humans and soldiers and don't commit atrocities, happy 2021!
What is a feature of readable code?
The code is interesting to read.
The code uses meaningful names for variables, procedures, and classes.
The code is all aligned to the left margin.
The code is as compact as possible to save space.
Answer:
sorry for the wait but the answer is b
Explanation:
Answer:
The code uses meaningful names for variables, procedures, and classes.
Explanation:
is the answer
whats the best practices for a cyber security agent ??
Some of the key best practices for a cyber security agent include:
Stay updatedImplement strong security measuresPractice secure coding and developmentWhat should cyber security agents watch out for ?Sustained awareness of the ever-evolving cybersecurity landscape is imperative. Agents must actively pursue knowledge through training, certifications, and participation in industry events to stay abreast of the latest threats, trends, and technologies.
Implementing formidable security measures is paramount. This encompasses deploying firewalls, intrusion detection systems, encryption protocols, and fortified authentication mechanisms. Emphasize secure coding practices during the development lifecycle.
Find out more on cyber security at https://brainly.com/question/31026602
#SPJ1
What are APIs mainly used for
Answer:
APIs are used to integrate new applications with existing software systems.
Explanation:
Answer:
APIs are used to integrate new applications with existing software systems. This increases development speed because each functionality doesn't have to be written from scratch. You can use APIs to leverage existing code.
Which of these would be a good name for a variable that holds a person’s first name?
tomSmith
N01
firstName
lastName
Answer:
firstNAme
Explanation:
Answer:
firstName
Explanation:
I took the test
Write a function to calculate the distance between two points Distance( x1, y1,x2.2) For example Distance(0.0,3.0, 4.0.0.0) should return 5.0 Use the function in main to loop through reading in pairs of points until the all zeros are entered printing distance with two decimal precision for each pair of points.
For example with input
32 32 54 12
52 56 8 30
44 94 4439 6
5 19 51 91 7.5
89 34 0000
Your output would be:__________.
a. 29.73
b. 51.11
c. 55.00
d. 73.35
e. 92.66
Answer:
The function in Python3 is as follows
def Distance(x1, y1, x2, y2):
dist = ((x1 - x2)**2 +(y1 - y2)**2)**0.5
return dist
Explanation:
This defines the function
def Distance(x1, y1, x2, y2):
This calculates distance
dist = ((x1 - x2)**2 +(y1 - y2)**2)**0.5
This returns the calculated distance to the main method
return dist
The results of the inputs is:
\(32, 32, 54, 12 \to 29.73\)
\(52,56,8,30 \to 51.11\)
\(44,94,44,39\to 55.00\)
\(19,51,91,7.5 \to 84.12\)
\(89,34,00,00 \to 95.27\)
**HELP ME PLS**
A report tried "Employees in Company A contains the names of employees in descending alphabetical order, with the
number of years each employee worked at the company. Which statement is true? A.The report is grouped only because it gives information about employees by number of years of employment.
B.The report is soned only because it gives information about employees by number of years of employment.
C.The report is grouped only because it organizes the names of the employees in alphabetical order.
D.The report is sorted only because it organizes the names of the employees in alphabetical order.
The true statement is the report is grouped only because it gives information about employees by number of years of employment.
What is a group report?Group reporting is made up of consolidation method and analytical reports and it gives information on the output of a firm.
Note that since there are different ranges of employment years, the report need to be grouped and as such, The true statement is the report is grouped only because it gives information about employees by number of years of employment.
Learn more about group report from
https://brainly.com/question/13628349
#SPJ1
In Python, when converting a string value into a numeric value that is a positive or negative whole number, the int() function is used.
True
False
Answer:
True
Explanation:
The Int Variable can handle Positive and Negative Numbers, it just can't handle decimal numbers.
The statement "In Python, when converting a string value into a numeric value that is a positive or negative whole number, the int() function is used" is true.
What is python?Python is a popular computer programming language used to create software and websites, automate processes, and analyze data. Python is a general-purpose language, which means it may be used to make many various types of applications and isn't tailored for any particular issues.
Python is a great programming language for experienced developers as well. It's one of the most widely used programming languages in the world, maybe as a result of how simple it is for novices to learn. Python is one of the most approachable programming languages due of its simple syntax and lack of complexity.
Therefore, the statement is true.
To learn more about python, refer to the link:
https://brainly.com/question/18502436
#SPJ5
How do I turn on autosave in Pokemon Shield?
Answer:
You Can't
Explanation:There isn't a feature for that in the game.
Answer:
You can't. It really sucks. Just save your game every hour when you play.
20. Think about all the careers (example: teacher) you have learned about in this unit. List three careers and identify what the educational requirements are for each career. In addition, provide what high school subjects could help you prepare for these careers.
Answer:
Explanation:
Three careers and their educational requirements and recommended high school subjects are:
Nurse: To become a registered nurse (RN), you typically need to earn a Bachelor of Science in Nursing (BSN) degree from an accredited nursing program. Alternatively, you can become a licensed practical nurse (LPN) or licensed vocational nurse (LVN) with a diploma or certificate from an accredited program. High school subjects that can prepare you for a nursing career include biology, chemistry, and health sciences.
Software Developer: To become a software developer, you typically need a bachelor's degree in computer science, software engineering, or a related field. In addition, some employers may require or prefer candidates with a master's degree. High school subjects that can prepare you for a career in software development include computer science, mathematics, and physics.
Lawyer: To become a lawyer, you typically need to earn a Juris Doctor (JD) degree from an accredited law school and pass a state bar exam. High school subjects that can help you prepare for a legal career include history, government, and English.
In general, high school students who are interested in pursuing a specific career should focus on taking courses that will prepare them for the educational requirements of that career. Additionally, participating in extracurricular activities or internships related to the desired career can also be beneficial in gaining practical experience and developing relevant skills.
Instructions
Write a program that prompts the user to input an integer and then outputs both the individual digits of the number and the sum of the digits.
For example, it should output the individual digits of:
3456 as 3 4 5 6
8030 as 8 0 3 0
2345526 as 2 3 4 5 5 2 6
4000 as 4 0 0 0
-2345 as 2 3 4 5
My code:
#include
using namespace std;
int main(int argc, char* argv[]){
// Write your main here
int a=0,b[100]={0},n=0,sum=0;
cin>>a;
while(a>0)
{
b[n]=a%10;
a/=10;
n++;
}
for(int i=n; i>0; i--)
{
printf("%d ",b[i-1]);
sum+=b[i-1];
}
printf(" Sum: %d ",sum);
cin.get(); cin.get();
return 0;
}
Problem:
The input needs to be -2345
and the output should result in
Sum: 0
but it's wrong,
the result of this code is 50%
and I don't know why, pls help
A program that prompts the user to input an integer and then outputs both the individual digits of the number and the sum of the digits is given below:
The Program#include < iostream >
int main( int argc , char * argv [ ] )
{
int number , digit , sum = 0;
std : : cout < < " Enter number : " ;
std : : cin > > number ;
while ( number > 0 )
{
digit = number % 10;
std : : cout << digit << ' \ t ' ;
sum = sum + digit ;
number = number / 10 ;
}
std : : cout < < " Sum is : " < < sum < < std : : endl ;
return 0;
}
Your original code has the right ideas, but you will have to use the std to print out the output as used above and your output would be in individual numbers.
Read more about programming here:
https://brainly.com/question/23275071
#SPJ1
Making data secure means keeping it secret
Answer:
Data security refers to the process of protecting data from unauthorized access and data corruption throughout its lifecycle. Data security includes data encryption, hashing, tokenization, and key management practices that protect data across all applications and platforms.
True or false: A restrictive policy on a firewall denies all traffic by default, and only specifically allowed traffic is permitted into the Network.
Answer: True
Explanation:
But the firewall may not always be safe enough and will sometimes have a leak.
Calculate the total resistance of this simple circuit. If R1 = 100Ω, R2 = 200Ω.
Answer: (66.7_1.8)Ω
Explanation: Hope it's helpful