Write a program to count the number of occurrences of each word in a hardcoded paragraph.
MediumProblem Statement
Write a program to count the number of occurrences of each word in a hardcoded paragraph.
Sample Input
Paragraph: "C# is great and C# is fun"
Sample Output
Occurrences: C#: 2 is: 2 great: 1 and: 1 fun: 1
Limits
Time: 2s · Memory: 256 MB
Code Editor
00:00
using System;
using System.Collections.Generic;
class WordFrequency
{
static void Main()
{
// Count the occurrences of each word in the paragraph
}
}
Input
Paragraph: "C# is great and C# is fun"
Expected Output
Occurrences: C#: 2 is: 2 great: 1 and: 1 fun: 1