Skip to content

dpspcghst/c-sharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 

Repository files navigation

c-sharp

Practice & code projects from SoloLearn.

  • My First Code Coach!

    • Let's code for real! The given program should output the text: "My first C# Code Coach!". But something is wrong.
  • Social network

    • You are making a social network application and want to add post creation functionality. As a user creates a post, the text "New post" should be automatically outputted so that then the user can add the text he/she wants to share. The program you are given declares a Post class with a text private field, and the ShowPost() method which outputs the content.
    • Complete the class with
      • a constructor, which outputs "New post" as called,
      • Text property, which will allow you to get and set the value of the text field.
    • Once you have made the changes to the program so that it works correctly, then in main, the program will take the text of the post from the user, create a post object, assign the taken value to the text field and output it.
  • Solve The Puzzle

    • A game machine has 5 games installed on it. Write a program to take N number as input and output the corresponding game with N index from the array. If user enters an invalid number that is out of array range, the program should output "Invalid number".
  • Only The Evens!

    • The program you are given takes 5 numbers as input and stores them in an array. Complete the program to go through the array and output the the sum of even numbers.
  • Array To Table

    • Complete the program to output this array in the form of a table (without separation):
      • 123
      • 456
      • 789
  • Qualifying For The Olympics

    • The qualifiers for the Olympiad lasts 3 days, and one winner is selected each qualifying day. The jagged array you are given represents the list of all participants, divided by the number of days (there are 3 arrays inside the main one, each representing the participants who took part on that day). Write a program to take the numbers of each day's winners as input and output them.
  • Minimum And Maximum

    • Write a program to take 5 numbers as input, then calculate and output the sum of the maximum and the minimum inputted values.
  • Password Rules

    • You are creating an authentication system. The given program takes the password as input.
      • Write a program to output "Invalid", if it contains any disallowed symbols.
      • If the password requirement is satisfied, program shouldn't output anything.
  • Words

    • The program you are given defines an array with 10 words and takes a letter as input. Write a program to iterate through the array and output words containing the taken letter. If there is no such word, the program should output "No match".
  • Who Won?

    • Five participants have advanced to the final round of a TV trivia show, and it is time to announce the winner and end the game. The program you are given defines the array of finalists, takes the index of the winner as input, and creates the FinalRound object. Complete the FinalRound class by writing the needed code in constructor to take the array and the winner index as parameters and output the corresponding message to show the winner. Then create a destructor to finish the game and output "Game Over".
  • Grow Your Business

    • A company has 2 departments and it is growing, so more departments are needed. The program you are given takes the number of departments to be opened as input, then takes their names and creates Department objects, passing their names as the constructor. Complete the Department class to have 1 static member depCount with an initial value of 2 for the number of departments and the constructor that will count it and output corresponding message (see sample output).
  • Array Sorting

    • The program you are given takes the N number as the size of an array, followed by N numbers. Complete the program to sort and output every element of an array, each on a new line.
  • All About This

    • The program you are given takes 2 numbers as input and should calculate and output their average. But something is wrong. Complete the Avg class by creating the constructor, where the 2 parameters will be assigned to members of the class.
  • Music Selector

    • The music app you enjoy allows you to choose 5 music genres to follow. The program you are given takes 5 music genres as input and stores them in the MusicGenres object as an array. Fix the program by declaring an indexer inside the MusicGenres class so that the given outputs work correctly.

About

Practice code & code projects from SoloLearn.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages