Klavyeden Sürekli Girilen Sayıların Toplamı 50'yi Geçince Durma

H

HZ.CİN

Cin Terbiyecisi
Ultra Member
Joined
Dec 22, 2019
Messages
387
Reaction score
73
Location
Cehennem
Klavyeden Sürekli Girilen Sayıların Toplamı 50'yi Geçince Durma
C#:
int toplam = 0,sayi,sayac=0;
while(toplam<50)
{
    Console.Write("Sayı giriniz:");
    sayi = Convert.ToInt32(Console.ReadLine());
    toplam += sayi;
    sayac++;
}

Console.WriteLine("{0} adet sayı girişi yaptınız. Girilen sayıların toplamı={1}", sayac,toplam);
Console.ReadKey();
 
SPAM IS FORBIDDEN!
  • SPAMMERS ARE BANNED FROM THE FORUM AND CANNOT USE ANY OF THE CHEATS
  • For example: thanks, thx, very good, asdqwe, working, ty and so on!
  • For example: Writing the same message over and over. thanks, thx and so on!
  • Copying and copying someone else's message is prohibited.
  • It is forbidden to send messages to increase the number of comments on threads that you have no knowledge of.
  • Write your own opinion when commenting!
  • If you see spam message, please let us know with the REPORT button!

Tema düzenleyici

Top Bottom