It’s me. . . SOMMY ! ! !

Welcome to my Orange world ! ! !

โปรแกรมคิด score ฟุตบอล ภาษา C++

แสดงความเห็นโดย sommy บน กรกฎาคม 21, 2007

#include
int main () {
int s1=0, s2=0, s_a=0, s_b=0, s_c=0;
cout <> s1 >> s2;
if (s1>s2) {s_a+=3;}
else if (s1==s2) { s_a+=1;
s_b+=1;}
else s_b+=3;
cout <> s1 >> s2;
if (s1>s2) {s_a+=3;}
else if (s1==s2) { s_a+=1;
s_c+=1;}
else s_c+=3;
cout <> s1 >> s2;
if (s1>s2) {s_b+=3;}
else if (s1==s2) { s_b+=1;
s_c+=1;}
else s_c+=3;

//Total Scores
cout << “\nThe Total Scores\n” << “A : ” << s_a << endl << “B : “<< s_b << endl << “C : ” << s_c<s_b&&s_a>s_c) cout <s_a&&s_b>s_c) cout <s_a&&s_c>s_b) cout << “C is the winnter\n”;

}

ถึงจะมั่ว แต่ก็ compile นะจ๊ะ เอิ๊กกกกก

มีการตอบกลับหนึ่งครั้ง ถึง “โปรแกรมคิด score ฟุตบอล ภาษา C++”

  1. bugton กล่าว

    โปรแกรมไรของแกฮะ อ่านยากมากมาย = =”

    ที่จริงไม่ใส่ return 0 ก็ไม่น่าผิดมากหรอก ถ้าฟังชั่นนั้นมี return type เป็น void (ป่าวหว่า เริ่มเลอะเลือน)

ใส่ความเห็น

XHTML: คุณสามารถใช้แท็กเหล่านี้ได้: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>