MyPizzeria restaurant has a reward card that awards points t

MyPizzeria restaurant has a reward card that awards points to its customers based on the number of times they dine in the place each month. The points are awarded as follows: If a customer purchases 0 Pizza, he or she earns 0 points. If a customer purchases 1 Pizza, he or she earns 5 points. If a customer purchases 2 Pizza, he or she earns 15 points. If a customer purchases 3 Pizza, he or she earns 30 points. If a customer purchases 4 or more Pizza, he or she earns 60 points. Create an application that lets the user enter the number of times she/he has dined this month and displays the number of points awarded.

Solution

using System.IO;
using System;

class Program
{
static void Main()
{
int points = 0;
Console.Write(\"Enter the number of times he/she dined this month: \");
int num = Convert.ToInt32(Console.ReadLine());
if(num == 0)
points = 0;
else if(num == 1)
points = 5;
else if(num == 2)
points = 15;
else if(num == 3)
points = 30;
else if(num >= 4)
points = 60;
Console.WriteLine(\"You are awarded with \" + points + \" points for this month.\");
}
}

 MyPizzeria restaurant has a reward card that awards points to its customers based on the number of times they dine in the place each month. The points are awar

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site