Jump to content

Yazdığım Program Çalışmıyor


Mycrosoft
 Share

Recommended Posts

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.
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...