0
点赞
收藏
分享

微信扫一扫

c++ 变量声明


#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 条评论