Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What would the coding be for this problem? 5 points Status: Not Submitted In this article, the American Heart Association recommends that adult men get

image text in transcribed
image text in transcribed
What would the coding be for this problem?
5 points Status: Not Submitted In this article, the American Heart Association recommends that adult men get no more than 36 grams of added sugar and adult women get no more than 25 grams of added sugar per day. In this program, ask the user to enter the number of grams of added sugar they have eaten that day. Using 30 grams as the cut off point, use a boolean statement to state if the user can eat more sugar. Here is what your output should look like: How many grams of sugar have you eaten today? 28 You can eat more sugar: true Source: https://www.heart.org/en/healthy living healthy eating/eat- smart/sugar/added-sugars 3.1.7: Sugar Tax Save Submit + Continue 1 import java.util.Scanner; 2 3 public class Added Sugar 4-{ 5 public static void main(String[] args) 6 { 7 // Create a Scanner object 8 9 // Ask the user for the grams of sugar 10 11 // Use a boolean expression to print if they can eat more sugar 12 } 13}

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_2

Step: 3

blur-text-image_3

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

More Books

Students also viewed these Databases questions

Question

What is a rock glacier, and why does it move?

Answered: 1 week ago

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago