Skip to content

Commit

Permalink
compiled by g++
Browse files Browse the repository at this point in the history
  • Loading branch information
Hallo,world authored and Hallo,world committed Jun 9, 2021
1 parent 7479383 commit 72dfd23
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
Binary file added -test
Binary file not shown.
Binary file added test
Binary file not shown.
28 changes: 28 additions & 0 deletions test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <iostream>
using namespace std;

// 变量声明
extern int a, b;
extern int c;
extern float f;

int main ()
{
// 变量定义
int a, b;
int c;
float f;

// 实际初始化
a = 10;
b = 20;
c = a + b;

cout << c << endl ;

f = 70.0/3.0;
cout << f << endl ;

return 0;
}

0 comments on commit 72dfd23

Please sign in to comment.