Thank-You :)
AJ
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Test_Program
{
class ShopScenario
{
static void Main(string[] args)
{
Console.WriteLine("Please Enter the Amount of Oranges");
int Oranges = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("\nPlease Enter the Amount of Apples");
int Apples = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("\nPlease Enter the Amount of Grapes");
int Grapes = Convert.ToInt32(Console.ReadLine());
float Stock_Total = Oranges + Apples + Grapes;
Console.WriteLine("Total Amount: {0}",Stock_Total);
float Oranges_Percentage = ((Oranges / Stock_Total) * 100);
float Apples_Percentage = ((Apples / Stock_Total) * 100);
float Grapes_Percentage = ((Grapes / Stock_Total) * 100);
Console.WriteLine("Orange Percentage: {0:f0}%", Oranges_Percentage);
Console.WriteLine("Apples Percentage: {0:f0}%", Apples_Percentage);
Console.WriteLine("Grapes Percentage: {0:f0}%", Grapes_Percentage);
}
}
}


Sign In
Create Account


Back to top









