Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Filter Passing Grades | Searching and Filtering Arrays
C# Arrays

bookChallenge: Filter Passing Grades

Opgave

Swipe to start coding

Write a program that filters and prints all passing grades from an integer array of scores. A passing grade is any score that is 60 or above.

  • Return a new integer array containing only the values from scores that are greater than or equal to 60.
  • The order of passing grades in the returned array should match their order in the original scores array.
  • If there are no passing grades, return an empty array.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 4
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Suggested prompts:

Can you explain this in simpler terms?

What are the main benefits of this approach?

Are there any common mistakes to avoid with this?

close

bookChallenge: Filter Passing Grades

Stryg for at vise menuen

Opgave

Swipe to start coding

Write a program that filters and prints all passing grades from an integer array of scores. A passing grade is any score that is 60 or above.

  • Return a new integer array containing only the values from scores that are greater than or equal to 60.
  • The order of passing grades in the returned array should match their order in the original scores array.
  • If there are no passing grades, return an empty array.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 4
single

single

some-alt