Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help!! I need all three of these to be in java 1.)Input an integer n from the keyboard. Calculate the sum of the first

Please help!! I need all three of these to be in java

1.)Input an integer n from the keyboard. Calculate the sum of the first n integers. So if n=10, the answer should be 55 (because 1+2+3+4+5+6=7+8+9+10=55)

2.) Input an integer from the keyboard. Calculate n! So if n=4, the answer should be 24 (because 1234=24) If n=5, the answer should be 120 (because 1234*5=120)

3.) Ask the user to enter an integer representing a grade between 0 and 100 (-1 to stop) For each grade determine whether it was an A (90 <=grade<=100), B (80<=grade<90), C(70<=grade<80), D(60<=grade<70), F (grade<=60). If it was an A, add one to the count for the number of As. Similarly for B, C, D, F. After the user enters -1 (to quit) output the number of As, number of Bs, number of Cs etc.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

2 The role of built-in stabilizers in dampening business cycles.

Answered: 1 week ago

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago