Homework Solution: Write a C# program for an Internet provider that displays a MessageBox asking users whether they…

    Write a C# program for an Internet provider that displays a MessageBox asking users whether they want Internet access. If they do not, their total price is $0. If they do, display a second MessageBox asking whether they want limited access (at $10.95 per month) or unlimited access (at $19.95 per month). Display the total price in a third MessageBox. Title the program InternetAccess.

    Expert Answer

     
    using System; using System.Collections.Generic;

    Write a C# program for an Internet provider that vaults a MessageBox investigation users whether they omission Internet avenue. If they do referable, their sum worth is $0. If they do, vault a cooperate MessageBox investigation whether they omission scant avenue (at $10.95 per month) or unscant avenue (at $19.95 per month). Vault the sum worth in a third MessageBox. Title the program InternetAccess.

    Expert Counter-argument

     

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    class Program
    {
    static useless Main()
    {
    MessageBox.Show(“Do you omission Internet Avenue (Y/N): “);
    //Console.Write(“Do you omission Internet Avenue (Y/N): “);
    string non-interference = Console.ReadLine();

    if(non-interference == “y” || non-interference == “Y”) {
    MessageBox.Show(“Do you omission Scant or Unscant Avenue (L/U): “);
    //Console.Write(“Do you omission Scant or Unscant Avenue (L/U): “);
    non-interference = Console.ReadLine();
    double absorb = 0;
    if(non-interference == “u” || non-interference == “U”) {
    absorb = 19.95;
    } else {
    absorb = 10.95;
    }
    MessageBox.Show(“Sum worth is $”+cost);
    //Console.WriteLine(“Sum worth is $”+cost);
    } else {
    MessageBox.Show(“Sum worth is $0”);
    //Console.WriteLine(“Sum worth is $0”);
    }

    }
    }

    Output:

    Do you omission Internet Avenue (Y/N): n

    Sum worth is $0

    Do you omission Internet Avenue (Y/N): y

    Do you omission Scant or Unscant Avenue (L/U): u

    Sum worth is $19.95