Im trying to run a code, but I cannot successed.. - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Im trying to run a code, but I cannot successed..

neus92neus92 Posts: 2Member
Hello guys.
I just started to study C language, and the first thing I have done, was to write a simple C code on Microsoft Visual C++..
I just copy-pasted a simply code from "Wiki", compile it, and run.
The code just calculated some simple things, like avrage of some grades and etc.. unfortunatly, when I enter some values to the program, and trying to get a result, the program just closing itself(not the Microsoft visual c++, the C file that I have written..)
so I cannot see the result(in this case, I cant see the value of the avrage of grades..) the program is just writing this statement:"[3440] sucka.exe: Native' has exited with code 0 (0x0)."
someone can help me please?:

Comments

  • Pelle-48Pelle-48 Posts: 43Member
    Normally if you are testing a simple program in windows it will close very fast in the end. You have two alternatives:
    Run the exe-file in a DOS box or add some kind of input in the end of your program like:
    (this is c)
    printf("write a single letter
    ");
    letter = getchar();
    putchar(letter);

    You need #include in the beginning for c
  • neus92neus92 Posts: 2Member
    still the same.. its just closing it..

  • Pelle-48Pelle-48 Posts: 43Member
    On rosettacode.org you have a huge amount of test programs. Try something simple like A+B and see if it works with your compiler!
Sign In or Register to comment.