Thread: Hi, I am learning c and write this. could you please help me what is wrong s

  1. #1
    Registered User
    Join Date
    Nov 2011

    Hi, I am learning c and write this. could you please help me what is wrong s

    int TV, DVD, MP3, SET; /* Tanımlamalar */

    printf("Satılan TV adedi?");
    scanf("%d", &TV);

    printf("Satılan DVD adedi?");
    scanf("%d", &DVD);

    printf("Satılan MP3 adedi?");
    scanf("%d", &MP3);

    printf("Satılan SET adedi?");
    scanf("%d", &SET);

    int TVTOTAL=TV*570;
    printf("TOPLAM FİYAT TV: %d\n", TVTOTAL);
    scanf("%d", &TVTOTAL);

    int DVDTOPLAM=DVD*180;
    printf("TOPLAM FİYAT DVD: %d\n", DVDTOPLAM);
    scanf("%d", &DVDTOPLAM);

    int MP3TOTAL=MP3*70;
    printf("TOPLAM FİYAT MP3: %d\n", MP3TOTAL);
    scanf("%d", &MP3TOTAL);

    int SETTOTAL=SET*350;
    printf("TOPLAM FİYAT SET: %d\n", SETTOTAL);
    scanf("%d", &SETTOTAL);

  2. #2
    Registered User
    Join Date
    Oct 2006
    first, you need to realize that C and C++ are not the same language, and choose a forum accordingly.

    second, it's unclear what you are trying to do with this program. what is your expected output? what errors are you getting?

  3. #3
    Rat with a C++ compiler Rodaxoleaux's Avatar
    Join Date
    Sep 2011
    First. Remember to use [ CODE ] tags with your source. I've noticed people saying that they won't even reply to messages that don't use these tags correctly. Also, why are you getting more input for a variable that you just assigned something to? What exactly is happening with the program? Besides the input for no reason, it works fine to me.

    EDIT:: Also this isn't C+ - nvm beaten.
    How to ask smart questions
    DWORD dwBytesOverwritten;
    BYTE rgucOverWrite[] = {0xe9,0,0,0,0};

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Learning Dos and learning Windows
    By blankstare77 in forum C++ Programming
    Replies: 8
    Last Post: 07-31-2005, 03:48 PM
  2. problem with fout.write: cannot write 0x0A (10 dec)
    By yvesdefrenne in forum C++ Programming
    Replies: 7
    Last Post: 05-23-2005, 12:53 PM
  3. Replies: 9
    Last Post: 07-15-2004, 03:30 PM
  4. Learning to write Windows Apps
    By johnson_a in forum Windows Programming
    Replies: 8
    Last Post: 05-31-2004, 04:17 PM
  5. API learning reference (for those who are learning)
    By steve_i83 in forum Windows Programming
    Replies: 1
    Last Post: 11-04-2001, 01:58 AM