Getting Started with C ++ language self-study

We use a classic example: A + B PROBLEM to explain the basic knowledge of C ++ language entry

(A+B Problem :https://www.luogu.org/problem/P1001)

 

First of all, welcome to see the article comrades joined OI !!!! (Applause!

Introduces C ++ IDE, DEVC ++ (Baidu can download their own

Secondly, this is just a small step OI.

We need to work forward, Xinshoucun early step over the mark!

(This Tacca will complement recent solution to a problem the whole valley of Los Xinshoucun.

Any great ending, we need a start

We started this article:

C ++ language is a good thing (pasical dead).

#include <iostream> // header file
 a using  namespace std; // application namespace
 int main () // main function 
// defined above, perhaps for the content you just touch the OI is still not well understood, you can above being the first as a C ++ template (written procedures should add meaning), as more and more experience you codewords, sooner or later you will understand (anyway, so I get! {
int a, b, c; // definition of a, b, c CIN
>> a >> b; // input, the input means and a b c = a + b; // operator, and c is meaning a and b COUT << c ; // output, c is a mean value after the operation return 0 ; // not actually used, but there must be at the end of the program, or it may therefore lose points OI examination. }

Thus, after finished the program, press F11 to save compile and run after

In the pop-up window, enter cmd 12

It will output 3

Means that 1 + 2 = 3

You can go to Los Valley (www.luogu.org) submitted about to try a

OK??

Attach a konjac QQ: 1933847524

Welcome to add friends.

END-----------------------------------------------------

 

Guess you like

Origin www.cnblogs.com/loi-cz/p/a_simple_problem.html