DevJourney · code I wrote while learning

README.md

655 B

Single File Programming Question

Problem Statement:

Alphabetics Game:

You have to enter four letters for each uppercase letter you will get 10 marks and for each lowercase letter, you will get -5 marks.

Write a program to calculate the total score.

Create a base class with a virtual method void game(). Define this method in the Derived class and calculate the total score.

Input format :

Input consists of four characters separated by space.

Output format :

The output prints the total score.

Sample test cases :

Input 1 :

A F K R

Output 1 :

Score : 40

Input 2 :

A b D f

Output 2 :

Score : 10