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
fomenos
4 years ago
8

Assume that price is an integer variable whose value is the price (in US currency) in cents of an item. Write a statement that p

rints the value of price in the form "X dollars and Y cents". So, if the value of price was 4321, your code would print "43 dollars and 21 cents". If the value was 501 it would print "5 dollars and 1 cents". If the value was 99 your code would print "0 dollars and 99 cents".
Computers and Technology
1 answer:
aivan3 [116]4 years ago
3 0

Answer:

// here is program in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variable

int price;

cout<<"enter the price: ";

// read the price

cin>>price;

// find the dollars

int doll=price/100;

// find the cents

int cent=price%100;

// print the dollars and cents

cout<<doll<<" dollars and "<<cent<<" cents.";

return 0;

}

Explanation:

Read the price from user and assign it to variable "price".Then find the dollars by dividing the price with 100 and to find cents calculate modulus 100 of price. Then print both the value.

Output:

enter the price: 4321                                                                                                      

43 dollars and 21 cents.

You might be interested in
I cant tell if tubbo is a bee or a goat <br>or could he be human in the smp
JulsSmile [24]

Answer:

Tubbo is a goat or ram on the Dream SMP.

Explanation:

Since Jschlatt was his father and he's a ram, Tubbo is a ram.

8 0
3 years ago
What are some common security threats for our home devices and IoTs?
musickatia [10]

Answer:

  • Botnets. A botnet is a network that combines various systems together to remotely take control over a victim’s system and distribute malware.
  • A denial-of-service (DoS) attack deliberately tries to cause a capacity overload in the target system by sending multiple requests.
  • In a Man-in-the-Middle (MiTM) attack, a hacker breaches the communication channel between two individual systems in an attempt to intercept messages among them.
  • Hackers use social engineering to manipulate people into giving up their sensitive information such as passwords and bank details.
  • Ransomware attacks have become one of the most notorious cyber threats. In this attack, a hacker uses malware to encrypt data that may be required for business operations. An attacker will decrypt critical data only after receiving a ransom.

Explanation:

6 0
3 years ago
Which type of password would be considered secure
max2010maxim [7]
Try using at least one capital letter and multiple number and symbols
Example: [email protected]#3
5 0
4 years ago
Read 2 more answers
Design and implement an application that reads an integer value representing a year from the user. The purpose of the program is
olga55 [171]

Answer :

Written in java

import java.util.Scanner;

public class Main{

   public static void main(String[] args) {

       int year;

       Scanner scanner = new Scanner(System.in);

       System.out.print("Please enter a year\n\n");

       year = scanner.nextInt();

       while (year < 1582) {

           System.out.print("\nPlease enter a different year above 1582\n");

           year = scanner.nextInt();

       }

       if (year % 4 == 0) {

           if(year % 100 ==0 && year % 400 != 0){

                   System.out.println(year + " is not a leap year\n\n");

           }else {

               System.out.println(year + " is a leap year\n");

           }

       } else {

           System.out.println(year + " is not a leap year\n\n");

       }

   }

}

4 0
3 years ago
A news company is planning to use a Hardware Security Module (CloudHSM) in AWS for secure key storage of their web applications.
lakkis [162]

Answer:

you cannot obtain a new copy of the keys that you have stored on Hardware Security Module, because they are lost forever and a new copy cannot be obtained if a copy is not kept somewhere.

Explanation:

Hardware Security Module (CloudHSM) is a cloud-based hardware security module (HSM) that provides the user the opportunity to create and utilize your own encryption keys on the AWS Cloud. It is a fully managed service that takes care of time-consuming administrative activities such as software patching, backups, hardware provisioning, and high-availability for the user.

One of the key elements of the Hardware Security Module (CloudHSM) is that a copy of the keys stored must be kept somewhere because if keys are lost, they are lost forever and a new copy cannot be obtained if a copy is not kept.

Therefore, you cannot obtain a new copy of the keys that you have stored on Hardware Security Module, because they are lost forever and a new copy cannot be obtained if a copy is not kept somewhere.

5 0
3 years ago
Other questions:
  • A receiver requires 10nW as input power. If all the system losses add up to 50dB, then how much power is required from the sourc
    15·1 answer
  • Horses developed longer legs over time in response to pressure from predators that they needed to outrun to survive.
    10·1 answer
  • TRUE OR FALSE!!!!!
    6·2 answers
  • Consider the following 32 bit binary representation of the value using IEEE 754 single precision floating point representation.
    15·1 answer
  • Desirable workplace habits and skills include:
    6·2 answers
  • 4.2 Code Practice: Question 1
    14·1 answer
  • Technician A says that oil for the rod bearings comes from splash off the crankshaft. Technician B says that lubrication to the
    14·1 answer
  • Which job role requires you to create user guides for computer products and services?
    13·2 answers
  • Write a program that prompts the user for an integer, then asks the user to enter that many values. Store these values in an arr
    14·1 answer
  • Choose the item which best describes the free frame list. 1. a per process data structure of available physical memory 2. a glob
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!