18. Sorunun Cevabı

18. Fiyat ve KDV oranı ayrı ayrı girilen 5 malın toplam fiyatını hesaplayınız. (Tüm soruları görmek için tıklayınız.)

 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace kdvlitoplam
{
    class Program
    {
        static void Main(string[] args)
        {//18. Fiyat ve KDV oranı ayrı ayrı girilen 5 malın toplam fiyatını hesaplayınız. http://2gx.org/
            Console.WriteLine("Fiyat ve KDV oranı ayrı ayrı girilen 5 malın toplam fiyatını hesaplayınız. http://2gx.org/");
            int toplam_fiyat = 0;
            int brut_fiyat;
            for (int i = 0; i < 5; i++)
            {
                Console.WriteLine("{0}. ürünün fiyatını giriniz", i + 1);
                int urun_fiyat = Int32.Parse(Console.ReadLine());
                Console.WriteLine("{0}. ürünün kdv oranını giriniz", i + 1);
                int urun_kdv = Int32.Parse(Console.ReadLine());
 
                brut_fiyat = (((urun_fiyat * urun_kdv) / 100)+urun_fiyat) ;
                Console.Write(" brut  fiyat=" + brut_fiyat);
                toplam_fiyat = toplam_fiyat + brut_fiyat;
                Console.WriteLine(" toplam fiyat=" + toplam_fiyat);
            }
            Console.Write(" toplam fiyat="+ toplam_fiyat);
            Console.ReadKey();
        }
    }
}
 

May 20th, 2010 | Kategoriler Ders, Yazılım | Toplam Okunma=458
İlk yorumu siz yazın.

Yorum Yazın

XHTML: İzin verilen HTML kodları: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Switch to our mobile site