Visual C# KLAVYEDEN GİRİLEN 10 SAYININ KARESİ,KÜPÜ,KARAKÖKÜ,FAKTORİYELİ Nİ HESAPLAYAN PROGRAM .?


1

Visual C# KLAVYEDEN GİRİLEN 10 SAYININ KARESİ,KÜPÜ,KARAKÖKÜ,FAKTORİYELİ Nİ HESAPLAYAN PROGRAM .? console uygulamasını yapın..

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static int Faktoriyel(int fak)
{
if (fak == 0)
return 1;
return fak * Faktoriyel(fak – 1);
}
static void Main(string[] args)
{
int[] i=new int[10];
int a;
a = 0;
do{
Console.Write(“Sayıyı Giriniz =“);
i[a] = Convert.ToInt32(Console.ReadLine());
a++;
}while (a <10);
a = 0;
do
{
Console.WriteLine(“{0} sayısının karesi {1} küpü {2} karekökü {3} faktoriyeli {4}“, i[a].ToString(), (i[a] * i[a]), i[a] * i[a] * i[a], Math.Sqrt(i[a]), Faktoriyel(i[a]));
a++;
} while (a < 10);

Console.ReadKey();
}
}
}

Bu İçeriğe Tepkin Ne Oldu?
  • ba_ar_l_
    Başarılı
    1
  • gayet_yi
    Gayet İyi
    0
  • te_ekk_rler
    Teşekkürler
    0
  • anlamad_m
    Anlamadım
    0
  • yetersiz
    Yetersiz
    0
Subscribe
Bildir
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Yorum
EMRULLAH

rastgele girilen bir sayının karesinin kare kökünü ve küpünü hesaplayan pragramı bulurmusunuz LÜTFEN :(