![]() |
Hipotenusu Hesaplayan CPP Bilgisayara sırasıyla iki dik kenarın uzunluklarını giriyorsunuz . Bilgisayar size float türünde hipotenüs uzunluğunu veriyor. #include <stdio.h> #include <math.h> void hyp(float,float); main() { float side1,side2; int cnt; for(cnt=1;cnt<=3;cnt++) { scanf(“%f%f”,&side1,&side2); hyp(side1,side2); } } void hyp(float x,float y) { float hyp1; hyp1=sqrt(pow(x,2)+pow(y,2)); printf(“Hypotenus = %.1f”,hyp1); } Kaynak: Doğu Akdeniz Univ. CSIT Labworks belgesi-415 |
| Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 22:56. |
Powered by vBulletin® Version 3.8.9 Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Site kurucuları: Damla ve Meltem