Write a program using integers userNum and divNum as input, and output userNum divided by divNum three times.

Answers

Answer 1

Answer:

Follows are the code to this question:

#include <iostream>//header file

using namespace std;

int main() //defining main method

{

int userNum, divNum;//defining integer variable

cin>> userNum >> divNum;//input values

cout <<"First-time divide: "<<userNum / divNum<<endl;//divide value First time  

cout <<"Second-time divide: " << userNum / divNum/divNum<<endl; //divide value Second time

cout<<"Third-time divide: "<< userNum /divNum/divNum/divNum<<endl;//divide value Third time

return 0;

}

Output:

2000

2

First-time divide: 1000

Second-time divide: 500

Third-time divide: 250

Explanation:

In this code two integer variable "userNum and divNum" is declared that uses the input method to input value from the user-end, and after input the value it divides the "userNum by divNum" three times, that is defined as follows:

In this code, the user input the value 2000 and 2, in the first divides it will give 1000, in the second time divide it will give 500, and in the third time it will give 250.


Related Questions

If Mark has a read-write permission to the share \\fileserver\securefiles and a read-only permission to the file coolstuff.docx on the NTFS file system shared by the file share, he is able to perform which action?

a. Rename the file.
b. Read the file.
c. Change the contents of the file.
d. Delete the file.

Answers

Answer:

I don't know  you should figure that out good luck

Explanation:

good luck

Under the Gramm-Leach-Bliley-Act (GLBA), banks must protect customer privacy. A given bank has just implemented its online banking solution that allows customers to access their accounts and perform transactions via their computers or personal digital assistant (PDA) devices. Online banking servers and their public Internet hosting would fall within which domains of security responsibility?

Answers

Answer:

System/Application Domain and LAN-to-WAN Domain.

Explanation:

The Gramm-Leach-Bliley-Act is also referred to as the Financial Services Modernization Act of 1999. It was enacted by the 106th Congress of the United States of America and it requires that financial institutions explain to their customers the information sharing policies and ensure that customer sensitive data (privacy) is safeguarded.

This, under the Gramm-Leach-Bliley-Act (GLBA), banks must protect customer privacy.

In this scenario, a given bank has just implemented its online banking solution that allows customers to access their accounts and perform transactions via their computers or personal digital assistant (PDA) devices.

Hence, online banking servers and their public Internet hosting would fall within the System/Application Domain and LAN-to-WAN Domain.

In an IT infrastructure, there are seven main domains and these are the: User Domain, Workstation Domain, LAN Domain, LAN-to-WAN Domain, Remote Access Domain, WAN Domain, and System/Application.

How many digits are there in a decimal system

Answers

Answer:

10

Explanation:

Answer:

4

Explanation:

Tenth , hundredth , thousandths , tenthousanths

45. Our goals are a reflection of our:
O values
O standards
O obstacles
O resources
beliefs
values and beliefs

Answers

Values hope it helps you

7 steps in infographic design​

Answers

Answer:

Step 1: Choose your topic and research your audience. Before looking at your data, think about a topic and an audience with whom it can resonate.  

Step 2: Take a look at your data and consolidate it.  

Step 3: Craft the copy.  

Step 4: Design!  

Step 5: Review, review, review.

Step 6: Publish and promote.  

Conclusion.

Explanation:

Process infographics are a specific type of infographic, designed to visualize, summarize and simplify processes. They're perfect for visualizing marketing strategies, new employee onboarding, customer journey maps, product guides, recipes and more.

true or false Encryption prevents hackers from hacking data?

Answers

Answer:

The answer here is False.

Explanation:

Encryption protects the data and not access to data.

In some cases, the hacker may not necessarily be trying to access or decrypt the data. They may prevent one from accessing it by placing a Ransomeware virus on it.

What a Ransomeware virus would do is to prevent the legal and rightful owner from accessing such data (whether encrypted or not) until their demands are met.

In many cases, they would ask for monies or cryptocurrencies.

Another way hackers attempt to get encrypted files is to try to get the decryption keys instead. The best practice against this is to keep decryption keys manually or in a password manager. Another way to protect very sensitive information is to have sensitive systems isolated from the internet.

Cheers

While the Internet is used to share many useful services and information, there are growing concerns about the way that the Internet can be used to spread damaging information ranging from national secrets to calls for violence. Censoring this information may provide some people with increased security, but potentially risks free speech and the safety of social and political activists.

a. True
b. False

Answers

Answer:

A true!

Explanation:

Which tab of the ribbon should you go to for removing gridlines on a worksheet?​

Answers

Answer:

just click on the option gridline

You should go to the Page Layout tab of the ribbon to remove gridlines on a worksheet.

This tab hold all the features and options that can enable you to arrange your documents as you want them to appear.

It can help you to do the following:

set marginstake control of the page orientationDisplay line breaksAdd sectionsSet paragraphs and also indent.

Read more on: https://brainly.com/question/11874395?referrer=searchResults

Java Programming Using nested if statement For a student to be accepted in XYZ College, the student must meet the following requirements: GPA must be 3.75 or higher. Family income must be more than $60,000 Applicant must be a New Jersey resident. XYZ college asked you to write a program to implement the above requirements. Write the program using (nested if) Submit: Source code for the program (java file) Output word or pdf or jpg Design pseudocode pdf or word or jpg

Answers

Answer:

Follows are the solution to this question:

import java.util.*;//import package  

public class Main//defining a class

{

       public static void main(String[] ags)//main method  

       {

       float GPA;//defining floating point variable  

       int annual_income;//defining integer variable

       Scanner ga = new Scanner(System.in);//creating Scanner class object

       System.out.println("Enter GPA of student family : ");//print message

       GPA= ga.nextFloat();//input value from user-end

       System.out.println("Enter annual income of student family : ");//print message

       annual_income= ga.nextInt();//input value from user-end

      System.out.println("Is student resident of New Jersey(y/n) :");//print message

       char a=ga.next().charAt(0);//defining char variable to input char value

if(GPA>=3.75) //use if block to check GPA value

       {

        if(annual_income>60000) // use if to check annual income value

         {

            if((a == 'y'|| a== 'Y')) //use if to check char value

   System.out.println("Student accepted in college");//print message

            else//defining else block

             System.out.println("Student is not accepted in college because he/she not resident of New Jersey ");//print message

         }

        else//defining else block

          System.out.println("Student is not accepted in college because annual income is less than $60000 ");//print message

    }

   else//defining else block

    System.out.println("Student is not accepted in college because GPA is less than 3.75 ");//print message

       }

}

Output:

Please find the attached file.

Explanation:

Please find the attached file of the pseudocode.

In this code one integer, one float, and char variable "GPA, annual_income, and a" is declared, that uses the scanner class for accept value from the user-end, and in the next step, nested if the statement is used that checks the GPA value, annual_income, and a value and use the print method to print a value with the message.

Master method/theorem can be used to find the running time of all recursive programs.

a. True
b. False

Answers

it should be a. true

a technique for printing text images or pattern which originated in china as a method for printing on paper​

Answers

Answer:

Woodblock printing or block printing is a technique for printing text, images or patterns used widely throughout East Asia and originating in China in antiquity as a method of printing on textiles and later paper. As a method of printing on cloth, the earliest surviving examples from China date to before 220 AD.

What are the characteristics of Instant Search in Outlook 2016? Check all that apply. A)Typing whole phrases makes your search more efficient.
B)An Instant Search box appears in every view in Outlook.
C)Instant Search can be found under the Search tab in Outlook.
D)After typing one word, it immediately begins displaying results.
E)The Search contextual tab appears when Instant Search is selected.

Answers

Answer:

B, D, and E.

Explanation:

Answer:

B,D,E

Explanation:

Edg 2021 just took test

What can you use to make sure that you have no errors in Word Online?

Answers

Answer:

You can use grammarly. It woks amazingly!

Explanation:

What is IP address ?explain​

Answers

Answer:

An IP address is a unique address that identifies a device on the internet or a local network. IP stands for "Internet Protocol," which is the set of rules governing the format of data sent via the internet or local network.

Explanation:

IP addresses provide a way of doing so and form an essential part of how the internet works.

Answer: An Internet Protocol address is a number which is unique to. each device connected to the label. It is used for identification and location.  

Explanation:

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:

Answers

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.

8.11 LAB: Contact list (C++)









A contact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. Write a program that first takes as input an integer N that represents the number of word pairs in the list to follow. Word pairs consist of a name and a phone number (both strings). That list is followed by a name, and your program should output the phone number associated with that name.


Ex: If the input is:


3 Joe 123-5432 Linda 983-4123 Frank 867-5309

Frank

the output is:


867-5309


Your program must define and call the following function. The return value of GetPhoneNumber is the phone number associated with the specific contact name.

string GetPhoneNumber(vector nameVec, vector phoneNumberVec, string contactName)


Hint: Use two vectors: One for the string names, and the other for the string phone numbers.

Answers

Answer:

The vectors and phone numbers are 123-5432-983-4123-867-5309

Explanation:

In this lab, you use the flowchart and pseudocode found in the figures below to add code to a partially created C++ program. When completed, college admissions officers should be able to use the C++ program to determine whether to accept or reject a student, based on his or her test score and class rank.
start input testScore,
classRank if testScore >= 90 then if classRank >= 25 then output "Accept"
else output "Reject" endif else if testScore >= 80
then if classRank >= 50 then output "Accept" else output "Reject" endif
else if testScore >= 70
then if classRank >= 75 then output "Accept"
else output "Reject"
endif else output "Reject"
endif
endif
endif
stop
Study the pseudocode in picture above. Write the interactive input statements to retrieve: A student’s test score (testScore) A student's class rank (classRank) The rest of the program is written for you. Execute the program by clicking "Run Code." Enter 87 for the test score and 60 for the class rank. Execute the program by entering 60 for the test score and 87 for the class rank.
[comment]: <> (3. Write the statements to convert the string representation of a student’s test score and class rank to the integer data type (testScore and classRank, respectively).)
Function: This program determines if a student will be admitted or rejected. Input: Interactive Output: Accept or Reject
*/ #include using namespace std; int main()
{ // Declare variables
// Prompt for and get user input
// Test using admission requirements and print Accept or Reject
if(testScore >= 90)
{ if(classRank >= 25)
{ cout << "Accept" << endl; }
else
cout << "Reject" << endl; }
else { if(testScore >= 80)
{ if(classRank >= 50)
cout << "Accept" << endl;
else cout << "Reject" << endl; }
else { if(testScore >= 70)
{ if(classRank >=75) cout << "Accept" << endl;
else cout << "Reject" << endl; }
else cout << "Reject" << endl; } } } //End of main() function

Answers

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";}

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.

Answers

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;

}

}

A header is printed in the _____ margin
(1)Top
(2)Bottom
(3)Side
(4)both a and b ​

Answers

Answer:

(1)Top

Explanation:

Bcoz it is header

A header can be printed on the top margin.

What is a header?

A part of a text in the line that is generally used to describe the title or the topic of the text contained below such line is known as a header. It is represented in the top margin, as a title can be written on the bottom side.

Hence, option A holds true regarding a header.

Learn more about a header here:

https://brainly.com/question/15163026

#SPJ2

raman will perform in pune tomorrow(simple past)​

Answers

Answer:

Raman performed in Pune yesterday

Answer:

Raman had performed in Pune

Which family of controls included in the risk management Infrastructure is related to preventing the use of unauthorized codes?​

Answers

Answer:

Operational Security Control

Explanation:

The family of controls included in the risk management Infrastructure that is related to preventing the use of unauthorized codes is known as "Operational Security Control."

This is because Operational Security Control defines potency of controls which involves the access controls, including the use of unauthorized codes, authentication, and security measures made to networks, systems, and applications.

Answer:

system and information integrity

Explanation:

i got a 100 on the test

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

Answers

Explanation:

The major difference between the two, however, is that an intranet is typically used internally.

The major difference between the intranet and extranet is that The major difference between the two, however, is that an intranet is typically used internally.

What is an Intranet?

Traditionally, an intranet is the concept of as a non-public and confined inner Web-primarily based totally web website online and/or community this is best handy to customers inside an organization.

An intranet is a non-public community contained inside an agency this is used to soundly proportion business enterprise facts and computing assets amongst employees. An intranet also can be used for operating in corporations and teleconferences. Intranets inspire communique inside an organization.

Read more about the communications:

https://brainly.com/question/26152499

#SPJ2

Word processing package allow users to?

Answers

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. 

Consider the following code segment, which is intended to simulate a random process. The code is intended to set the value of the variable event to exactly one of the values 1, 2, or 3, depending on the probability of an event occurring. The value of event should be set to 1 if the probability is 70 percent or less. The value of event should be set to 2 if the probability is greater than 70 percent but no more than 80 percent. The value of event should be set to 3 if the probability is greater than 80 percent. The variable randomNumber is used to simulate the probability of the event occurring.
int event = 0;
if (randomNumber <= 0.70)
{
event = 1;
}
if (randomNumber <= 0.80)
{
event = 2;
}
else
{
event = 3;
}
The code does not work as intended. Assume that the variable randomNumber has been properly declared and initialized. Which of the following initializations for randomNumber will demonstrate that the code segment will not work as intended?
A) randomNumber = 0.70;
B) randomNumber = 0.80;
C) randomNumber = 0.85;
D) randomNumber = 0.90;
E) randomNumber = 1.00;

Answers

Answer:

A) randomNumber = 0.70;

Explanation:

The code works perfectly for all values of randomNumber given in the options except option (a)

This is so because:

The first condition

if (randomNumber <= 0.70)  {  event = 1;  }

It checks if randomNumber is less than or equal to 0.70. This is true, so event is set to 1.

However, the next condition after it will also be executed because it is a different conditional to be executed.

So, we have:

if (randomNumber <= 0.80)  {  event = 2;  }

This condition is also true, so event is set to 2.

From the question randomNumber is meant to be event 1. However, this is different from the result of executing the code.

Hence, (a) is true

How many digits are in the binary number system? Explain why.

Answers

Answer:

Since there are only two digits in binary, there are only two possible outcomes of each partial multiplication: If the digit in B is 0, the partial product is also 0. If the digit in B is 1, the partial product is equal to A.

Explanation:

Answer:

two digits

Explanation:

Binary – The binary numbering system has a base of 2 (MOD-2) and uses only two digits a “0” and a “1” to represent a binary number value.

1. ERICUS Company sells Ghacem cement at 30.0 Ghana Cedis per bag. The company however gives discount of 15% for customers that buy 100 or more bags, and 0% for customers that buy less than 100 bags. Write a pseudocode.

Answers

See Comment for complete question

Answer:

Input Bags

Discount = 0%

If Bags >= 100 Then

Discount = 15%

End If

Print Discount

Stop

Explanation:

This gets the number of bags bought

Input Bags

This initializes the discount to 0%

Discount = 0%

If the bags of cement bought is 100 or above

If Bags >= 100 Then

This discount becomes 15%

Discount = 15%

This ends the if statment

End If

This prints the discount percentage

Print Discount

This ends the pseudocode

Stop

what are layers in Photoshop ​

Answers

Answer:

Photoshop layers are like stacked pieces of stacked acetate. You can see through some parts because they are transparent. You can use layers to add on to your picture easily like adding extra images, text, or colors.

how can you best explain server side caching with web pages​

Answers

Answer:

Server side web caching typically involves utilizing a web proxy which retains web responses from the web servers it sits in front of, effectively reducing their load and latency.

Explanation:

Top-level domain identifies the type of organization. Which one does NOT belong?
Question 4 options:

.gov

.mil

.org

.cn

Answers

Answer:

.cn does Not belong the rest of them do belong

the answer is “.mil”.

Create a relational database table in Microsoft Excel for the grocery store of 20 employers.

Answers

Answer:

That is not a question.

Explanation:

Other Questions
Write each power as a product of the same factor. Then find the value. 7^2 can someone help me ? Finding angle measures using triangles (veiw image) Which of the following disorders, conditions, or events is a serious health consequence of poorly-controlled gestational diabetes? Use proper probability notation. Identify function and label inputs when using technology.1. Honda cars make up 18% of registered vehicles in Florida. You take a SRS of 500 car owners in Florida. What is the chanceyour sample contains 20% or more of Honda owners? Use the 4-step plan. Art school is an unnecessary expense for an aspiring multimedia designer.True or False Consider the function that assigns to each positive number x the value Do you think this function is linear or nonlinear?Develop a list of inputs and outputs for this function. Organize your work using the table below. Then, answer the questions that follow.Input (x)Output (y)0.11/10 .0.21/50.42/50.51/20.84/5101.68/5202.55/24050Plot the inputs and outputs as ordered pairs defining points on the coordinate plane.- You will do this on the peardeck or a piece of paper.What shape does the graph of the points appear to take?Find the rate of change using rows 1 and 2 from the table above.Find the rate of change using rows 2 and 3 from the table above.Find the rate of change using any two other rows from the table above.Return to your initial claim about the function. Is it linear or nonlinear? Justify your answer with as many pieces of evidence as possible. 1.Archaeologists have discovered the legendary Golden Igloo of the Pribiloff Islands, a structure consisting of ahalfspherical shell with an inner diameter of 1.25 m and an out diameter of 1.45 m. What is the value of this antiquity,given that gold currently sells for $1,263/ounce and has a density of 19.3 g/cm3? (Note that 1 ounce = 31.1034768 g) Amaia walks from her home to the bank, then to the park, and then to get groceries before heading home. The path she travels is in the shape of a parallelogram and is shown in the diagram below. How many total meters did Amaia walk? what is the elasped time between 1:35 and 6:00 Rome was ruled by seven kings. what happened to the last king? On a coordinate grid, the coordinates of vertices P and Q for polygon RQRS are P(1, 2) and Q(-1, 2) Select the correct answer from each drop-down menu.What is the reason the cell membrane is made of phospholipids?The cell membrane is made of phospholipids to prevent molecules from freely{blank} and{blank} the cell.The options of the first blank is: entering or expanding And the opinions for the second black are: moving or exiting Labor unions were formed to fight for all of the following EXCEPT. Single choice.better wagessafer working conditions8 hour work dayhigher profits for business What is the tax due for a single taxpayer reporting a taxable income of $65,725?And you areIf line 43(taxableincome) is-AtButleast lessthanSingleMarried Married Head offiling filing householdjointly separatelyYour tax is-65,00065,000 65,05065,050 65,10065,100 65,15065,150 65.20011,99512,00812,020120338,8218,8298,836SQM11,99512,00812,020120210,50910,52110,534 "the emperors test" theme? The work-dock of the cell where proteins are made are? A. Ribosomes B. Lysosomes C. Mitochondria D. Golgi Find the value of from the following right triangle.plzzz help i will mark you as brainliest Please help me on this and explain it. The _________ of exercise determines the health and fitness benefit of the exercise. A. frequency B. intensity C. time D. type Please select the best answer from the choices provided. Dr. King believes that extremists are...Aviolent and rarely accomplish anything at all.Bdelusional and misunderstand political issues.necessary to bring about change in an unjust society.Dextremely beneficial for society because of their wealth.