Mycrosoft Posted February 20, 2011 Share Posted February 20, 2011 C'ye yeni başladım ve bir şeyler öğrendim. Aşağıdaki minicik programı yazdım: [code]/* İlk C Programım. * * * * Yarıçapı verilen bir dairenin çevresini ve alanını hesaplar. */ #include <iostream> // cout, cin, endl için #include <stdlib.h> // EXIT_SUCCESS için using namespace std; #define PI 3.14 int main(void) { float radius; float circum, area; cout << "Yaricapi yaziniz: "; cin >> radius; circum = 2 * PI * radius; area = PI * radius * radius; cout << "Cevresi: " << circum << endl; cout << "Alani: " << area << endl; return EXIT_SUCCESS; } [/code] Derleme başarılı ama cmd arayüzü gelince program kapanıyor. Bunun sebebi nedir? Yardımlarınız için şimdiden teşekkürler. Quote Link to comment Share on other sites More sharing options...
JustbeKinq Posted February 26, 2011 Share Posted February 26, 2011 [b]Ekrana yazdırma komutu vardı galiba aklıma gelmiyor şuan sanırım ama problem ondan kaynaklı [/b] Quote Link to comment Share on other sites More sharing options...
ahmetcanars Posted February 27, 2011 Share Posted February 27, 2011 harbiden yahu kapanıyor kinqin dediği gibi kod uvardı ama aklıam gelmiyor benimde ? Quote Link to comment Share on other sites More sharing options...
Scarecrow Posted February 27, 2011 Share Posted February 27, 2011 Kodun sonuna System("pause") yaz return yerine . 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.