C++ 的swich语句

日期:2016-08-08 23:58:50 人气:1

C++ 的swich语句

#include void main() { double x,y; int t; cout<<"Please input x:"<<endl; cin>>x; if (x<1) t=1; if(x>=10) t=3; else t=2; switch(t) { case 1: y=x;break; case 2: y=2*x-1;break; case 3
    A+
热门评论