Write a pseudocode thats accept and then find out whether the number is divisible by 5 ​

Answers

Answer 1
Answer:

Answer:

input number

calculate modulus of the number and 5

compare outcome to 0

if 0 then output "divisible by 5"

else output "not divisible by 5"

Explanation:

The modulo operator is key here. It returns the remainder after integer division. So 8 mod 5 for example is 3, since 5x1+3 = 8. Only if the outcome is 0, you know the number you divided is a multiple of 5.


Related Questions

My friend Leo wants to have an emergency plan for his final exams on University of Southern Algorithmville. He has N subjects to prepare for, and for each subject, his score is determined only by the time he spend on learning. It's not surprising that Leo found out he actually spent zero time on preparing before. At least he knows when he can start learning all of these subjects. For each subject i, there is a start time, si when he can get all materials ready to start learning. And there is also a ending time ei for each subject, when his learning materials expire and he can't learn anymore. We know that si and ei are integers, and Leo can only dedicate to a single subject within each time phase. Universtiy of Southern Algorithmville (USA), a student's total grade is the minimum grade among all subjects. Leo wants you to help him find out the best outcome. Given N subjects and their time intervals (si; ei ), design an algorithm to find out the maximum time possible for the least prepared subject. Prove the correctness of your algorithm. (Hint: It's not enough to use the network ow algorithm alone to determine the answer.)
Our favorite program runs in 10 seconds on computer A, which has a 2 GHz clock. We are trying to help a computer designer build a computer, B, which will run this program in 6 seconds. The designer has determined that a substantial increase in the clock rate is possible, but this increase will affect the rest of the CPU design, causing computer B to require 1.2 times as many clock cycles as computer A for this program. What clock rate should we tell the designer to target?
What two benefits are a result of configuring a wireless mesh network? Check all that apply. 1. Performance 2. Range 3. WiFi protected setup4. Ad-hoc configuration​
Obtain the 9’s complement of the following eight-digit decimal numbers:1234987689009951
The Clean Air Act Amendments of 1990 prohibit service-related releases of all ____________. A) GasB) OzoneC) MercuryD) Refrigerants

Load the titanic sample dataset from the Seaborn library into Python using a Pandas dataframe, and visualize the dataset. Create a distribution plot (histogram) of survival conditional on age and gender

Answers

Answer:

Following is given the data as required.

The images for histograms for age and gender are also attached below.

I hope it will help you!

Explanation:

Find the basic period and basic frequency of the function g(t)=8cos(10πt)+sin(15πt)

Answers

Answer:

The period is

(2\pi)/(5)

The frequency is

(5)/(2\pi)

Explanation:

The period of both functions will be LCM of both period.

The period of cos is

(\pi)/(5)

The period of sin is

(2\pi)/(15)

Let convert each into degrees.

(\pi)/(5)  = 36

(2\pi)/(15)  = 24

Find the least common multiple between 36 and 24, which is 72.

Convert 72 into radians

72 =  (2\pi)/(5)

The period is 2pi/5.

The frequency is equal to

1/period.

so the frequency is

(1)/( (2\pi)/(5) )  =  (5)/(2\pi)

Which of the following is a central feature of agroup?interactionmutual influenceinterdependenceall of the given options

Answers

Answer: All of the above

Explanation: A group is considered as the collection of two or more constituents/individuals. The characteristics of the a group are interaction , interdependence,interaction etc. There is a sense of responsibility and trust to work to achieve goal by depending on each other is described as the interdependence and for this interaction between group is needed as to maintain good communication and also there is a influence of each other on each group member.

Create an application named TestSoccerPlayer that instantiates and displays a SoccerPlayer object. The SoccerPlayer class contains the following properties: Name - The player’s name ( a string) JerseyNum - The player's jersey number (an integer) Goals - Number of goals scored (an integer) Assists - Number of assists (an integer)

Answers

Answer:

public class TestSoccerPlayer {

   public static void main(String[] args) {

       SoccerPlayer playerOne = new SoccerPlayer("Rinco",9,16,22);

       System.out.println("The player of the season is "+playerOne.getName()+" His Jessey Number is "+playerOne.getJerseyNum()

       +" In the 2019/2020 season he scored and total of "+playerOne.getGoalsScored()+" and "+

               playerOne.getAssists()+" Asists");

   }

}

See the SoccerPlayer class with the feilds and methods (constructor, getter and setters) in the explanation section

Explanation:

public class SoccerPlayer {

   private String name;

   private int jerseyNum;

   private int goalsScored;

   private int assists;

   public SoccerPlayer(String name, int jerseyNum, int goalsScored, int assists) {

       this.name = name;

       this.jerseyNum = jerseyNum;

       this.goalsScored = goalsScored;

       this.assists = assists;

   }

   public String getName() {

       return name;

   }

   public void setName(String name) {

       this.name = name;

   }

   public int getJerseyNum() {

       return jerseyNum;

   }

   public void setJerseyNum(int jerseyNum) {

       this.jerseyNum = jerseyNum;

   }

   public int getGoalsScored() {

       return goalsScored;

   }

   public void setGoalsScored(int goalsScored) {

       this.goalsScored = goalsScored;

   }

   public int getAssists() {

       return assists;

   }

   public void setAssists(int assists) {

       this.assists = assists;

   }

}

What is the analysis and complexity of a shell sortalgorithms?

Answers

Answer: The shell sort is based on insertion sort. Here the list of elements are divided into smaller sub list which are sorted based on insertion sort.

Its best case time complexity is O(n* logn) and worst case is O(n* log^2 n)

Explanation:

Shell sort is an inplace sorting here we begin by dividing the list into sublist and sorting the list with insertion sort. We create interval for dividing the list into sub list until we reach the smallest interval of 1.

The best case is O(n* logn).

In an e-credit card transaction the clearinghouse plays the following role:A. validates and verifies the sellers payment information

B. initiates the transfer of money

C. transfers funds between the sellers bank and the buyers bank

D. all of the above

Answers

Answer:

validates and verifies the seller's payment information- A.

Answer:

Hi Samantha, i have a work with you.