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
BartSMP [9]
4 years ago
11

Submit program Grades using Swicth - Case (Java)

Computers and Technology
1 answer:
Amanda [17]4 years ago
6 0

Answer:

import java.util.*;

import java.util.Scanner;

import java.io.*;

public class Main

{

public static void main(String[] args) {

  System.out.println("Enter the percentage:");

       Scanner sc1= new Scanner(System.in);

       int percent=sc1.nextInt();

       switch((int)percent/10)

       {

           case 10:

           case 9:

               System.out.println("Grade: A");

               break;

           case 8:

               System.out.println("Grade: B");

               break;

           case 7:

               System.out.println("Grade: C");

               break;

           case 6:

               System.out.println("Grade: D");

               break;

           case 5:

           case 4:

           case 3:

           case 2:

           case 1:

               System.out.println("Grade: F");

               break;

           

       }

    }

}

Explanation:

The program is as mentioned above. The grades are alloted as per the marks.

You might be interested in
The belief that the odds of two events occurring together are greater than the odds of either event occurring alone is the _____
iris [78.8K]
The answer is D.) conjunction fallacy
3 0
3 years ago
Read 2 more answers
# q7 - create function readFileFirstLast() to meet the conditions below
MAVERICK [17]

Answer:

See explaination

Explanation:

def readFileFirstLast(filename):

# doc string

''' Function accept the filename and opens the fle

and reads all lines and strips new line character and

stores first and last in a string and return that string'''

#eception handle if file not found

try:

#opening the file

f = open(filename)

#reading the first line and striping the ne line

string = f.readline().strip()

#iterating until last line

for line in f:

pass

#concate the last line after strip the new line character to the string

string = string + " " + line.strip()

#return the string

return string

except:

#if file not found

return "File not found"

#taking the file name from user

filename = input("Enter a file name: ")

#printing the doc string in function

print("\ndoc_sting: \n"+ readFileFirstLast.__doc__+"\n")

#printing the returned string by calling the readFileFirstLast()

print("output string :")

print(readFileFirstLast(filename))

3 0
3 years ago
You are working as a Solutions Architect for a technology company which is in the process of migrating their applications to AWS
torisob [31]

Answer: Amazon DynamoDB

Explanation: Amazon DynamoDB(Database) is the database that works in quick speed of milliseconds at any area.It has the characteristics like built-in security section, manageable, restoration function, durable etc.These features helps in handling the request of numerous people on large scale everyday.

It can work in multiple region to and can have multiple master .Thus, the database demand mentioned in the question can be completed by using Amazon DynamoDB as it can fulfill the requires of the company.

6 0
4 years ago
Which of the following algorithmic efficiencies would be considered LEAST efficient?
LenaWriter [7]

Answer:exponential

Explanation: I believe

8 0
3 years ago
What unit of measurement is used for DIMM read and write times?​
zepelin [54]

Answer:

Nanosecond

Explanation:

Nanosecond is used for measuring DIMM read and write times.

5 0
3 years ago
Other questions:
  • Explain the nature of documents that can be suitable for mergin
    12·1 answer
  • Which of the following is NOT true about functions? They go below the main program in the source code file. They do a single tas
    10·1 answer
  • Jeffery wants to locate reliable academic information on the effects of global warming and ways to conserve energy. What is the
    5·1 answer
  • MSSQL
    10·1 answer
  • Methods can be ____ correctly by providing different parameter lists for methods with the same name.
    7·1 answer
  • Is anyone else recieving a notification from brainly near the search bar about a message and click it and there nothing there???
    8·1 answer
  • Discuss briefly four types of websites and the criteria you will use to evaluate the content of a website
    8·1 answer
  • What are the main features cyber law of Nepal​
    13·1 answer
  • Using only AND, OR and inverter gates to implement the above Boolean equation, how many gates are needed
    8·1 answer
  • A designer wraps up a final prototype of a language learning app in Adobe XD, and wants to share their work with the development
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!