0% found this document useful (0 votes)
31 views

Data Types Program

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Data Types Program

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

using System;

class DataTypesProgram
{
static void Main()
{

int Qty;
double Total_Price, Price_Per_Piece;

Console.Write("Enter the pieces of apple: ");


Qty = Convert.ToInt32(Console.ReadLine());

Console.Write("Enter the total price of apple: ");


Total_Price = Convert.ToDouble(Console.ReadLine());

Price_Per_Piece = Total_Price / Qty;

Console.WriteLine("\nThe total price of apple is: " + Total_Price);


Console.WriteLine("The value of the original price per piece is: " +
Price_Per_Piece);
Console.WriteLine("The value of converted price is: " +
Math.Round(Price_Per_Piece));

Console.WriteLine("\nPress any key to exit...");


Console.ReadKey();
}
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy