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
Softa [21]
2 years ago
6

write an algorithm to determine a student's final grade and indicate whether it is passing or failing. the final grade is calcul

ated as the average of 4 marks.
Computers and Technology
1 answer:
Nadusha1986 [10]2 years ago
3 0

Using the knowledge in computational language in algorithms it is possible to write the code being determine a student's final grade and indicate whether it is passing or failing.

<h3>Writting the algorithm :</h3>

<em>Start</em>

<em>Take 4 integer inputs for the different 4 subject like math, english, physics, chemistry.</em>

<em>Then calculate the grade based upon the average of four marks .</em>

<em>             grade = ( math + english + physics + chemistry ) / 4</em>

<em> if the value of the grade is more than 40, it will print pass otherwise it shows fail.</em>

<em>END</em>

See more about algorithm at brainly.com/question/22984934

#SPJ1

You might be interested in
What job title is used for the person who uses the server operating system to add and remove users, install software, and admini
yan [13]
System Administrator
7 0
3 years ago
Write a program that prompts the user to enter in a postive number. Only accept positive numbers - if the user supplies a negati
marusya05 [52]

Answer:

The c++ program to check prime numbers is shown below.

#include <iostream>

using namespace std;

int main() {

   int num, prime=0;

   do

   {

       cout<<"Enter a positive number."<<endl;

       cin>>num;

       if(num<1)

       {

           cout<<"Invalid number. Enter a positive number"<<endl;

           cin>>num;

       }

   }while(num<1);

   

   if(num==1 || num==2 || num==3)

       cout<<num<<" is a prime number."<<endl;

   else if(num%2 == 0)

       cout<<num<<" is not a prime number."<<endl;

   else

   {

       for(int k=3; k<num/2; k++)

       {

           if(num%k == 0)

               prime++;

       }    

   if(prime>1)

       cout<<num<<" is not a prime number."<<endl;

   else

       cout<<num<<" is a prime number."<<endl;

   }

}

OUTPUT

Enter a positive number.

-7

Invalid number. Enter a positive number

0

Enter a positive number.

79

79 is a prime number.

Explanation:

The user input is validated for positivity. A do while loop along with an if statement is implemented for verification.

do

   {

       cout<<"Enter a positive number."<<endl;

       cin>>num;

       if(num<1)

       {

           cout<<"Invalid number. Enter a positive number"<<endl;

           cin>>num;

       }

   }while(num<1);

The test for prime number is done by using multiple if else statements.

If user inputs 1, 2, or 3, message is displayed.

Else If user inputs an even number, message is displayed for not prime. This is done by taking modulo of the number upon division by 2.

Else if user inputs neither an even number nor a number less than 3, the modulus of the number is taken with divisors beginning from 3 up to half of the input number.

For this, an integer variable prime is initialized to 0. A number can be completely divisible by itself or by its factors.

If the number is divisible by any of the divisors, value of variable prime is increased by 1. If value of prime is greater than 1, this means that the user input is divisible by more than one divisor. Hence, the given number is not a prime number.

5 0
3 years ago
All of the following are common causes of electrical accidents and injuries, EXCEPT:
mote1985 [20]
<h3>✽ - - - - - - - - - - - - - - - ~<u>Hello There</u>!~ - - - - - - - - - - - - - - - ✽</h3>

➷ It would be D. I don't really see how the plug itself is a cause of electrical accidents.

<h3><u>✽</u></h3>

➶ Hope This Helps You!

➶ Good Luck (:

➶ Have A Great Day ^-^

↬ ʜᴀɴɴᴀʜ ♡

7 0
3 years ago
An entrepreneur wants to make an app to show what breeds of dogs are similar to each other. She wants to look at factors such as
Alex

Answer

Dog breeds = observations, Average weight and energy level for each breed = variables. Each cluster is a category.

Explanation:

Using a method of clustering, she would be putting the dog breeds that are more similar together and in order to do this she has to look at various factors such as observation which are the dog breeds, and the average weight and energy level of the breeds, which represents variables. Every one of these clusters would be a category.

7 0
3 years ago
Each 4G device has a unique Internet Protocol (IP) address and appears just like any other wired device on a network
Citrus2011 [14]

Answer:

A. True.

Explanation:

It is true that each 4G device has a unique Internet Protocol (IP) address and appears just like any other wired device on a network.

5 0
3 years ago
Other questions:
  • If you get musicilly can your parents see
    14·2 answers
  • Which step of the design process is the company currently engaged
    15·1 answer
  • In excel, a number can contain the characters__
    8·1 answer
  • For a new version of processor, suppose the capacitive load remains, how much more energy will the processor consume if we incre
    12·1 answer
  • In the ____ letter style, all components of the letter begin flush with the left margin.
    5·1 answer
  • Determining the Services Running on a Network Alexander Rocco Corporation has multiple OSs running in its many branch offices. B
    10·1 answer
  • PLLZZZZZ HELP I WILL GIVE BRAINLIEST IF ANSWER IS RIGHT
    14·2 answers
  • What keyword is used to declare a method in python?
    10·1 answer
  • Disadvantages of the divisional organization structure are _____. each division is able to operate independently from the parent
    5·1 answer
  • What enforces the location in which an app can function by tracking the location of the mobile device?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!