97、#define PI 3.14 语句中定义的PI的值为()。
97、#define PI 3.14 语句中定义的PI的值为()。
参考答案和解析
B
相关考题:
以下程序的执行结果是【】。 include define PI____3.14159 const int R=10; void main() 以下程序的执行结果是【 】。include<iostream>define PI____3.14159const int R=10;void main(){double a,b;ac2*R*PI;b=R*R*PI;cout<<"a="<<a<<","<<"b="<<b<<endl;"}
(13)为把圆周率的近似值 3.14159 存放在变量 pi 中,应该把变量 pi 定义为( )。A)Dim pi As IntegerB)Dim pi(7) As IntegerC)Dim pi As SingleD)Dim pi As Long
为把圆周率的近似值3.14159存放在变量pi中,应该把变量pi定义为A.Dim pi As IntegerB.Dim pi(7)As IntegerC.Dim pi As SingleD.Dim pi As Long
下面程序的输出结果是( )。 #define PI 3.1415 #define ARE(X) PI*x*x main() { int r=2; printf("%.2f",ARE(r+1)); }A.28.26B.28.26C.9.28D.9.28
下面宏定义正确的是( )A.#define S a*bB.#define PI 3.14;C.#define max(a,b) ((a) >(b) ?(a) ;(b) )D.#define s(x) (x)*(x);
下列定义中,不正确的有______。A.#define PI 3.141592B.#define S 345;C.int max(x,y);D.static char c; int x,y; { ...... }
下面程序的输出结果是( ) #define PI 3.1415 #define ARE(x) PI*x*x main () {int r=2; printf("%f",ARE(r+1)); }A.28.26B.28.26C.9.28D.9.28
程序运行结果为______。#define R 3.0#define PI 3.1415926#define L 2*PI*R#define S PI*R*Rmain(){ printf("L=%f S=%f\n",L,S);}A.L=18.849556 S=28.274333B.18.849556=18.849556 28.274333=28.274333C.L=18.849556 28.274333=28.274333D.18.849556=18.849556 S=28.274333
若有以下程序:include using namespace std;define PI 3.14class Point{private: in 若有以下程序: #include <iostream> using namespace std; #define PI 3.14 class Point { private: int x,y; public: Point(int a,int b) { x=a; y=b; } int getx() { return x; } int gety() { return y; } }; class Circle : public Point { private: int r; public: Circle(int a, int b,int c) :Point(a,b) { r=c; } int getr() { return r; } double area() { return PI*r*r; } }; int main() { Circle c1(5,7,10); cout<<c1.area()<<end1; return 0; } 程序执行后的输出结果是( )。A.314B.157C.78.5D.153.86
有以下程序:include using namespace std;define PI 3.14class Point{ private:int 有以下程序: #include <iostream> using namespace std; #define PI 3.14 class Point { private: int x,y; public: Point(int a,int b) { x=a; y=b; } int getx() { return x; }A.314B.157C.78.5D.153.86
当执行下列宏定义命令后,S的值为 ( ) # defineR3.0 # define PI 3.1415926 # define L2 * PI * R # define S PI * R * RA.3.1415926B.18.849556C.3D.28.2743334
设实型变量pi已赋值为3.14159,下面不能输出3.14的语句是()A、write(pi:0:2)B、writeln(pi:1:2)C、write(pi:2:2)D、writeln(pi:2)
在VB语言中,下列常量说明语句正确的是()。A、Const PI As Single=3.14B、Dim a As Integer=15C、Const PI=3.14 As singleD、Dim a=15 As Integer
对于在代码中经常要用到的且不会改变的值,可以将其声明为常量。如圆周率PI始终为3.14。现在要声明一个名为PI的圆周率常量,下面哪段代码是正确的()。A、const float PI;PI=3.14f;B、const float PI=3.14f;C、float const PI;PI=3.14f;D、float const PI=3.14f;
单选题为把圆周率的近似值3.14159存放在变量pi中,应该把pi定义为( )。ADim pi As IntegerBDim pi(7)As IntegerCDim pi As SingleDDim pi As Long
单选题表达式SQRT(PI()**2)的值是()。A3.54B3.14C6.28D1.57