Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you rewrite this Java code in the Swift programming language? 1 import java.util.Scanner; 2 public class ChangeMaker 4. public static void main (String []

Can you rewrite this Java code in the Swift programming language?

image text in transcribed

1 import java.util.Scanner; 2 public class ChangeMaker 4. public static void main (String [] args) 6 int amount, originalAmount, quarters, dimes, nickels, pennies; System.out println ("Enter a whole number from 1 to 99."); System.out.println ("I will find a combination of coins"); System.out.println ("that equals that amount of change."); Scanner keyboard new Scanner (System.in); amount -keyboard.nextInt (); originalAmountamount; quartersamount /25 amount amount % 25 dimes amount 10 amount amount % 10 nickelsamount/5 amount amount % 5 pennies amount System.out.println (originalAmount + 8 10 14 15 16 18 19 20 " cents in coins can be given as:"); System.out.println (quarters "quarters"); System.out.println (dimes "dimes"; System.out.println (nickels " nickels and); System.out.println (pennies " pennies"); 23 25 26 27 28

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

Advances In Databases And Information Systems Second East European Symposium Adbis 98 Poznan Poland September 1998 Proceedings Lncs 1475

Authors: Witold Litwin ,Tadeusz Morzy ,Gottfried Vossen

1st Edition

3540649247, 978-3540649243

More Books

Students also viewed these Databases questions

Question

How do team members know when they have achieved synergy?

Answered: 1 week ago

Question

What is dividend payout ratio ?

Answered: 1 week ago

Question

Explain the factors affecting dividend policy in detail.

Answered: 1 week ago