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
Sav [38]
3 years ago
9

Examine the following algorithm.

Computers and Technology
1 answer:
kodGreya [7K]3 years ago
5 0

Answer:

See the explanation please

Explanation:

A.

The algorithm tries to subtract the number of credits taken so far and the required credits for the degree before getting the number of credits required for the degree program and the number of credits the student has taken so far. Since the values are not known, calculation cannot be done.

Write the step 3 after step 5

B.

Step 1, 2, 4, 5 require user interaction, since it is asking the user to enter values

You might be interested in
Sometimes we care about the order of a list, and need to reorder the items according to a condition (alphabetical, numerical, et
Vikki [24]

Answer:

sorry can't help

Explanation:

3 0
3 years ago
Read 2 more answers
Write a program that reads in ten numbers and displays the number of distinct numbers and the distinct numbers separated by exac
ELEN [110]

Answer:

The program to this question can be given as:

Program:

//import package.

import java.util.*;

public class Main //defining the class

{

public static void main(String[] args) //defining main method  

{

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

 int[] a = new int[10];//define array.  

 int number,counts= 0,i;//define variable.

 System.out.print("Enter numbers: "); //message.

 for (i = 0; i < 10; i++) //loop  

 {

  number=ob.nextInt();

  if (isDistinct(a,number))

  {

      a[counts] = number;//assign value in array

      counts++; // Increment count

  }

 }

 System.out.println("The distinct numbers is :" + counts);

 System.out.print("The distinct number are :");

 for (i = 0; i <a.length; i++)//loop

 {

  if (a[i] > 0)

  {

   System.out.print(" " +a[i]);//print array.    

  }

   

 }

 System.out.println();

}

public static boolean isDistinct(int[] array, int num)//defining method  

{

 for (int i = 0; i < array.length; i++)//loop for check number  

 {

  if (num == array[i]) //check condition

  {

      return false; //return value false.

  }

 }

 return true; //return value true

}

}

Output:

First time run:  

Enter ten numbers: 1 2 3 4 5 6 7 8 9 10

The number of distinct numbers is 10

The distinct numbers are 1 2 3 4 5 6 7 8 9 10

Second time run:

Enter numbers: 2 3 5 8 7 4 3 2 1 2

The distinct numbers is :7

The distinct number are : 2 3 5 8 7 4 1

Explanation:

The description of the above java code can be given as:

  • In the above java code, a class is defined that is main inside a class-main function is defined in the main function firstly creating a scanner class object that is "ob" then define variables and array that are number, counts and a[].
  • To inserts array elements we use a loop. In the loop, we use integer variable number and define a condition in if block passes a function that check value count total value.
  • In the second loop, we check the condition that array elements value is greater than 0 and print all array elements.
  • The isDistinct function checks in the array two values are not the same. if the values are the same it will return false value because this function is the boolean type that returns an only boolean value.
6 0
2 years ago
Which statement is true of Web-based social media?
Nataliya [291]
I think the answer is A.
6 0
2 years ago
Which of the following is not a type of user account? A. Administrator b. Guest c. Group d. Standard
Arlecino [84]
I've never heard of a group account so I'm going with.
C. Group
5 0
3 years ago
How do I take off the header off my second page in google docs ? ( I only need it on page 1)
iragen [17]
You cant headers are applied to every page. Apply your header under the header
3 0
3 years ago
Read 2 more answers
Other questions:
  • If you define CSS rules on a parent control, the rules will be inherited by all of the children widgets.
    12·1 answer
  • You are attempting to update a Windows image that has been mounted under C:\mount on your local system. What command must you us
    13·1 answer
  • Assume that the variables gpa, deansList and studentName, have been declared and initialized . Write a statement that both adds
    6·1 answer
  • In the processes tab of task manager, the ____ tab displays the âworking setâ of a process, or the amount of memory it is active
    12·1 answer
  • In terms of object-oriented programming,after class is defined,________ can be created for that class.
    15·1 answer
  • A bluetooth network consists of _____ primary device(s) and up to ____ secondary devices.
    8·1 answer
  • Lines s, t, and u are perpendicular bisectors of the sides FGH and meet at J. If JG=2x+2, JH=2y-4, JF=8 and HI=3z-3, find x, y,
    15·2 answers
  • Community gardens are public gardens where local residents can grow plants in a plot. They are very popular, so there are often
    7·1 answer
  • Write an algorithm to display your name 10 times​
    5·1 answer
  • Please help with this coding question
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!