Create a program that will ask a user to enter a number of tokens he/she want's to buy and displays
*the amount to pay
*total tokens acquired
*how many paid tokens
*and number of free tokens
using System;
using System.Collections.Generic;
namespace App
{
class Program
{
public static void Main()
{
Console.Write("Enter a number of tokens you want to buy: ");
int numberTokens = int.Parse(Console.ReadLine());
Console.WriteLine("The amount to pay {0}", (numberTokens * 10));
Console.WriteLine("Total tokens acquired {0}", (numberTokens));
Console.WriteLine("How many paid tokens {0}", (int)(numberTokens*0.1));
Console.WriteLine("The number of free tokens {0}", (int)(numberTokens * 0.2));
Console.ReadLine();
}
}
}
Comments
Leave a comment