012-001-007

Static Variable: Visit Counter

Easy

Problem Description

static variable: Visit Counter

In this problem, you will create a program that uses a WebPage class with a static variable to count webpage visits the specified number of times and displays the visit count and total visitors to standard output.

Learning Objective: Manage class-wide information with static variable

Create program counting webpage visits. Use static variable to manage total visit count shared across all instances.

Input

Line 1: Visit count (integer)

Output

Visit count: [count] times
Total visitors: [total] people

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up