ยินดีต้อนรับเข้าสู่ jokergameth.com
jokergame
jokergame shop webboard Article Social


Colocation, VPS


joker123


เว็บไซต์เราจะอยู่ไม่ได้หากขาดเขาเหล่านี้ รวมช่วยกันสนับสนุนสปอนเซอร์ของพวกเรา

colocation,โคโลเคชั่น,ฝากเซิร์ฟเวอร์ game pc โหลดเกม pc slotxo Gameserver-Thai.com Bitcoin โหลดเกมส์ pc
ให้เช่า Colocation
รวมเซิฟเวอร์ Ragnarok
Bitcoin

กำลังแสดงผล 1 ถึง 7 จากทั้งหมด 7
  1. #1
    ชอบดูไม่ชอบโพสต์
    วันที่สมัคร
    Aug 2011
    กระทู้
    50
    กล่าวขอบคุณ
    148
    ได้รับคำขอบคุณ: 254

    ช่วยด้วยครับ ภาษาซีผม eeror

    คือผมต้องการที่จะคำนวณอัตราส่วน ปูิน ทราย หิน สมมติ ใส่1 ค่าจะออกมา เป็น 1:2:3 แต่ปัญหาเกิด มันไม่ออกตามนั้น ครับ ช่วยหน่อยนะครับ

    #include<stdio.h>
    #include<conio.h>
    main()
    {
    int cement,sand,stone;
    printf("Enter Cement : ");
    scanf("%d",&cement);
    cement == cement*1;
    sand == cement*2;
    stone == (cement*2)+1;
    printf("%d : %d : %d",cement,sand,stone);
    getch();
    }

  2. #2
    Upload Anime
    วันที่สมัคร
    Jul 2011
    ที่อยู่
    บ้านไง........จะมีที่ไหนอีก
    กระทู้
    1,651
    กล่าวขอบคุณ
    2,075
    ได้รับคำขอบคุณ: 2,076
    อ้างถึง กระทู้ต้นฉบับโดยคุณ casanovasby อ่านกระทู้
    คือผมต้องการที่จะคำนวณอัตราส่วน ปูิน ทราย หิน สมมติ ใส่1 ค่าจะออกมา เป็น 1:2:3 แต่ปัญหาเกิด มันไม่ออกตามนั้น ครับ ช่วยหน่อยนะครับ

    #include<stdio.h>
    #include<conio.h>
    main()
    {
    int cement,sand,stone;
    printf("Enter Cement : ");
    scanf("%d",&cement);
    cement == cement*1;
    sand == cement*2;
    stone == (cement*2)+1;
    printf("%d : %d : %d",cement,sand,stone);
    getch();
    }
    ลืม
    void main()
    หรือปล่าว - -
    ผมอย่างไม่ได้ลองรันนะไม่ว่างโทษที

  3. #3
    Mokona^Modoki
    วันที่สมัคร
    Jul 2011
    ที่อยู่
    Alexsandia
    กระทู้
    640
    กล่าวขอบคุณ
    548
    ได้รับคำขอบคุณ: 658
    Edit : เข้าใจละ คือโปรแกรม รันได้ แต่ เลขผิด

    #include<stdio.h>
    #include<conio.h>
    main()
    {
    int cement,sand,stone;
    printf("Enter Cement : ");
    scanf("%d",&cement);
    cement = cement*1;
    sand = cement*2;
    stone = (cement*2)+1;
    printf("%d : %d : %d",cement,sand,stone);
    getch();
    }
    แบบนี้รึป่าวครับ
    แก้ไขครั้งสุดท้ายโดย arada_vivi : 19th September 2013 เมื่อ 18:26

  4. #4
    คมเขี้ยวแห่งชีวิต !!!
    วันที่สมัคร
    Jul 2011
    กระทู้
    729
    กล่าวขอบคุณ
    610
    ได้รับคำขอบคุณ: 443
    cement = cement * 1; <<< รับค่า Cement มาแล้วมิใช่รึ ?

  5. #5
    น่าเบื่อ จังชีวิตนี้ ชิ!
    วันที่สมัคร
    Sep 2011
    กระทู้
    2,889
    กล่าวขอบคุณ
    38
    ได้รับคำขอบคุณ: 2,225
    เขียน ฟังก์ชั่น เพิ่มอีกดีกว่า จะได้ดูง่ายขึ้น

    จะได้แก้ไขง่ายตาม

  6. #6
    IWillBeAComputerEngineer
    วันที่สมัคร
    Jul 2011
    กระทู้
    357
    กล่าวขอบคุณ
    994
    ได้รับคำขอบคุณ: 59
    ใส่ = อันเดียวไม่ใช่หรอ

    ปล.error เขียนแบบนี้น่ะครับ

  7. #7
    ชอบโพสต์เป็นชีวิตจิตใจ
    วันที่สมัคร
    Jul 2011
    ที่อยู่
    in the dark corner of the system
    กระทู้
    184
    กล่าวขอบคุณ
    20
    ได้รับคำขอบคุณ: 409
    Blog Entries
    1
    อ้างถึง กระทู้ต้นฉบับโดยคุณ casanovasby อ่านกระทู้
    คือผมต้องการที่จะคำนวณอัตราส่วน ปูิน ทราย หิน สมมติ ใส่1 ค่าจะออกมา เป็น 1:2:3 แต่ปัญหาเกิด มันไม่ออกตามนั้น ครับ ช่วยหน่อยนะครับ

    #include<stdio.h>
    #include<conio.h>
    main()
    {
    int cement,sand,stone;
    printf("Enter Cement : ");
    scanf("%d",&cement);
    cement == cement*1;
    sand == cement*2;
    stone == (cement*2)+1;
    printf("%d : %d : %d",cement,sand,stone);
    getch();
    }
    Operator ผิดแก้ใหม่
    #include<stdio.h>
    #include<conio.h>
    main()
    {
    int cement,sand,stone;
    printf("Enter Cement : ");
    scanf("%d",&cement);
    cement = cement*1;
    sand = cement*2;
    stone = (cement*2)+1;

    printf("%d : %d : %d",cement,sand,stone);
    getch();
    }
    ปล. = กับ == คนละอย่างกันนะ
    Nothing is "Impossible" as impossible itself says "I-m-possible".
    >>งดให้ความช่วยเหลือกับผู้ใช้ภาษาไทยไม่ถูกต้อง<<
    --> ก่อนจะตั้งคำถามควรลองใช้ Google ค้นหาก่อน <--


 

กฎการส่งข้อความ

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Back to top