king_child Posted February 23, 2011 Share Posted February 23, 2011 Klavyeden girilen x sayısı için x+x[sup]2[/sup]+x[sup]3[/sup]+x[sup]4[/sup]+...+x[sup]15[/sup] işlemini yapan programı c++ dilinde for döngüsü kullanark oluşturabilir misiniz ?Çok uğraştım fakat çalışmadı program. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted February 23, 2011 Share Posted February 23, 2011 Lua dilinde yapılabilir işini görürse Quote Link to comment Share on other sites More sharing options...
galetis Posted February 23, 2011 Share Posted February 23, 2011 C#; double sayi = double.parse(textbox1.text); double toplam; for (int i = 1; i <= 15; i++) { toplam += Math.Pow(sayi, i); } label1.text = toplam.tostring(); ------------------------------------------ Php $sayi = $_GET['sayi']; $toplam = 0; for ($i = 1; $i <= 15; $i++) { $toplam += pow($sayi, $i); } echo $toplam; ------------------------------------------ Biraz c++ biliyosan çevir Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.