Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: do-while Loop | Cicli
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Fondamenti di C#

bookChallenge: do-while Loop

Compito

Swipe to start coding

In this task, you will practice using a do-while loop to simulate a real-life scenario: saving money daily until reaching a target amount.

  • Inside the CalculateSavings method:
    • Initialize totalSaved to 0.
    • Initialize days to 0.
    • Use a do-while loop to:
      • Add dailySaving to totalSaved each day.
      • Increment days by 1.
      • Repeat the loop until totalSaved is greater than or equal to targetAmount.

Soluzione

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 4. Capitolo 7
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

close

bookChallenge: do-while Loop

Scorri per mostrare il menu

Compito

Swipe to start coding

In this task, you will practice using a do-while loop to simulate a real-life scenario: saving money daily until reaching a target amount.

  • Inside the CalculateSavings method:
    • Initialize totalSaved to 0.
    • Initialize days to 0.
    • Use a do-while loop to:
      • Add dailySaving to totalSaved each day.
      • Increment days by 1.
      • Repeat the loop until totalSaved is greater than or equal to targetAmount.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 4. Capitolo 7
single

single

some-alt