Home > Back-end >  Inquire of c select statement, basic problem
Inquire of c select statement, basic problem

Time:03-09

#include
#include
using namespace std;
Int main ()
{cout<& lt;" . "& lt; x; The switch (x) {case 1: {float a=0.00000678 f; Double b=0.00000678; A=a + 111111.111 f; B=b + 111111.111; Cout
}

Don't know why the upload option out don't run!

CodePudding user response:

Finishing upstairs code, commissioning, result in the end, didn't find the building problem:
 # include & lt; Iostream> 
#include
using namespace std;
Int main ()
{
Cout<& lt;" . "& lt; Cout & lt; <"Hello!" Cout & lt; & lt;" Welcome to c + +!" Cout<& lt;" . "& lt; getchar();
Cout<& lt;" Which task order you like to do?" Cout<& lt;" 11 "& lt; int x;
Cin> x;
The switch (x) {
Case 1: {
Float a=0.00000678 f;
Double b=0.00000678;
A=a + 111111.111 f;
B=b + 111111.111;
CoutCout<& lt;" A="& lt; Cout<& lt;" H \ ti \ \ b BJK \ n123 \ '\' \ \ \ 102 cde x41 \ "& lt; break;
}
}

return 0;
}

//...
//Hello!
//Welcome to c + +!
//...
//3
//Which task order you like to do?
//11
//2
//f ge
//h jk
//123 '\ "ABCDE
//please press any key to continue...


//...
//Hello!
//Welcome to c + +!
//...
//1
//Which task order you like to do?
//11
//1
//a=111111.1093750000000000, 111111.1110067800037000
b=//please press any key to continue...

CodePudding user response:

 int main () 
{
Cout<& lt;" . "& lt; Cout & lt; <"Hello!" Cout & lt; & lt;" Welcome to c + +!" Cout<& lt;" . "& lt; getchar();
Cout<& lt;" Which task order you like to do?" Cout<& lt;" 11 "& lt; int x;
Cin> x;
The switch (x) {
Case 1: {
Float a=0.00000678 f;
Double b=0.00000678;
A=a + 111111.111 f;
B=b + 111111.111;
CoutCout<& lt;" A="& lt; Cout<& lt;" H \ ti \ \ b BJK \ n123 \ '\' \ \ \ 102 cde x41 \ "& lt; break;
}
}
}

CodePudding user response:

reference 1st floor QZJHJXJ response:
upstairs code, test run, result in the end, didn't find the building problem:
 # include & lt; Iostream> 
#include
using namespace std;
Int main ()
{
Cout<& lt;" . "& lt; Cout & lt; <"Hello!" Cout & lt; & lt;" Welcome to c + +!" Cout<& lt;" . "& lt; getchar();
Cout<& lt;" Which task order you like to do?" Cout<& lt;" 11 "& lt; int x;
Cin> x;
The switch (x) {
Case 1: {
Float a=0.00000678 f;
Double b=0.00000678;
A=a + 111111.111 f;
B=b + 111111.111;
CoutCout<& lt;" A="& lt; Cout<& lt;" H \ ti \ \ b BJK \ n123 \ '\' \ \ \ 102 cde x41 \ "& lt; break;
}
}

return 0;
}

//...
//Hello!
//Welcome to c + +!
//...
//3
//Which task order you like to do?
//11
//2
//f ge
//h jk
//123 '\ "ABCDE
//please press any key to continue...


//...
//Hello!
//Welcome to c + +!
//...
//1
//Which task order you like to do?
//11
//1
//a=111111.1093750000000000, 111111.1110067800037000
b=//please press any key to continue...
strange [face] monkey2:006 PNG [/face]
  • Related