#25010: [請益]a002. 簡易加法


2016105email (C++C)


各位高手大大門 您好:

請問程式碼有錯誤嗎??

謝謝

 

#include <stdafx.h>

#include <iostream>

 

using namespace std;

 

int main(array<System::String ^> ^args)

{

    int  a ;

int  b ;

    int c ;

cout << "a= ";

cin >> a  ;

cout << "b= ";

cin >> b  ;

c=a+b ;

cout << "c= "<< a+b;

cout << endl ;

 

system("pause");

    return 0;

}

#25011: Re:[請益]a002. 簡易加法


asnewchien@gmail.com (david)


各位高手大大門 您好:

請問程式碼有錯誤嗎??

謝謝

 

#include

#include

 

using namespace std;

 

int main(array ^args)

{

    int  a ;

int  b ;

    int c ;

cout << "a= ";    < ------  X

cin >> a  ;

cout << "b= ";   < ------  X

cin >> b  ;

c=a+b ;

cout << "c= "   < ------  X

<< a+b;

cout << endl ;

 

system("pause");    < ------  X

    return 0;

}

打叉的地方