当前位置: 首页 > news >正文

太原网站建设维护竞价推广培训

太原网站建设维护,竞价推广培训,行业网站制作,成都有哪些网站建设这里主要还是强制类型转换的使用//打印字符ASCII码值 //输入一个除空格以外的可见字符 //输出其ASCII值--十进制整数 #include iostream using namespace std;int main() {char ch;cin ch;//字符cout (int)ch endl; return 0; }//打印字符…这里主要还是强制类型转换的使用//打印字符ASCII码值  //输入一个除空格以外的可见字符 //输出其ASCII值--十进制整数 #include iostream using namespace std;int main() {char ch;cin ch;//字符cout  (int)ch endl; return 0; }//打印字符 #include iostream using namespace std; //之前写的是  int main() {int n 0;cin n;char ch n;cout ch endl; return 0;} //现在学习了强制类型转换可以写成  int main() {int n 0; cin n;cout (int)ch endl;     return 0;} //和 —— //前置  后置 //无论前置后置 --都是为了让操作数自1 -1 #include iostream using namespace std;int main() {int a 10;//a;////cout a endl;//----11//a;//cout a endl;//-----11 //    a--; //    cout a endl;//----9 //     //    --a; //    cout a endl;//----9return 0; }//区别是后置是先使用再1  #include iostream using namespace std;int main() {int a 10;int b a;cout a a endl;cout b b endl;//a 11,,b 10    return 0; }#include iostream using namespace std;int main() {int a 10;int b a;cout a a endl;cout b b endl;//a 11,,,b 10return 0; }#include iostream using namespace std;int main() {int a 10;int b a--;cout a a endl;cout b b endl;//a 9,,,b 10return 0; }#include iostream using namespace std;int main() {int a 10;int b a--;cout a a endl;cout b b endl;//a 9,,,b 9return 0; }C/C的输入输出getchar/putchargechar-----必须包含头文件---#include cstdioint getchar (void);#include iostream #include cstdiousing namespace std;int main() {int ch gechar();//输入端口--()是传参需要必不可少 cout ch endl;//输入a--输出97 //注意gechar有严格的输入格式要求   return 0;} #include iostream #include cstdiousing namespace std;int main() {int ch gechar();cout ch endl;cout (char)ch;ch gechar();cout ch endl;cout (char)ch;cout xxxxx endl;//输出a//     97//     a10----gechar有严格的格式在输入a时输入的回车/n键也被记录的--10 ////   xxxxx return 0; }putchar---输出字符#include iostream #include cstdiousing namespace std;int main() { //    int ch getchar(); //    putchar(ch);putchar(x);putchar(\n);putchar(y);putchar(\n);putchar(z);putchar(\n);//输出// x// y// z// return 0;} //输入两个整数a,b,输出a除以b的值保留三位小数 //输入两位整数在int范围内 //输出一个浮点数保留三位小数 #include iostream #include cstdio using namespace std;int main()  {int a, b;cin a b;double r a * 1.0 / b;printf(%.3f\n,r);return 0; }//甲流疫情死亡率 //输入共两行第一行第一个整数为确诊数a第二行为整数死亡数b //输出仅一行甲流死亡率以百分数形式输出精确到小数点后三位  #include iostream #include cstdiousing namespace std;int main() {int a,b;cin a b;//计算printf(%.3f%%\n,b*0.1 / a*100); return 0; }//温度表达转换  //利用公式C 5 8 F- 32/ 9  //C是摄氏度F是华氏温度 输入华氏温度F输出摄氏温度C //要求精确到小数点后5位  //输入一行包含一个实数F小数表示华氏温度F -456.67) //输出一行包含一个实数表示对应的摄氏温度 #include iostream #include cstdiousing namespace std;int main() {double f;cin f;double c 5 * (f - 32) / 9;printf(%.5f\n,c);return 0; }//计算并联电阻的阻值 //对于r1和r2的电阻公式 //R1/(1/r2 1/r2)  //输入r1r2输出并联后的阻抗大小 //结果保留小数点后两位  #include iostream #include cstdiousing namespace std;int main() {double r1,r2;cin r1 r2;double r 1 / (1 / r1 1 / r2);printf(%.2f\n,r);return 0; }//与圆相关的计算 //给出圆的半径求圆的周长直径和面积 //每个 数保留4位小数 #include iostream #include cstdioconst double PI 3.14159;using namespace std;int main() {double r ;cin r;double z 2 * r;double l 2 * PI *r;double a PI * r * r;printf(%.4f %.4f %.4f\n,z,l,a);return 0; }//输入三个整数按每一个整数占8字符的宽度右对齐输出他们 //按照格式要求依次输出他们空格隔开#include iostream #include cstdiousing namespace std;int main() {int a,b,c;cin a b c;printf(%8d %8d %8d\n,a,b,c);return 0; }//512345个小朋友有输入若干 糖果 //他们都将糖果均分位三份 自己留一份其余的分给相邻的两个小朋友 //一轮后每个小朋友手上分别有多少糖果  //#include iostream #include cstdiousing namespace std;int main() {int a,b,c,d,e;cin a b c d e;//1a / 3; b a; e a;//2b / 3; c b; a b;//3c / 3; d c; b c;//4d / 3; e d; c d;//5e / 3; a e; d e;printf(%5d%5d%5d%5d%5d\n,a,b,c,d,e);return 0;} #include iostream #include cstdiousing namespace std;int main() {return 0; }//数字反转 //输入一个不小于100且小于1000同时包括小数点后一位的一个浮点数 //例如 123.4要求把这个数字翻过来变成4.321并输出//#include iostream //#include cstdio // //using namespace std;//int main() //{ //    char a,b,c,d,e; //     //    cin a b c d e; //    //     1    2    3    .    4 //    cout e d c b a;  //     //     //    return 0; // } //int main() //{ //    char a,b,c,d,e; //    scanf(%c%c%c.%c,a,b,c,d,e); //    print(%c.%c%c%c\n,e,d,c,b,a); //     //    return 0; //}//输入三角形三条边abc  // 其面积为 (p*(P-a)(p-b)(p-c))*0.5; //p(a bc)/2      //输出 面积 #include iostream #include cstdio #include cmath #include iomanipusing namespace std;double a,b,c; int main() {cin a b c;double p (a b c) / 2;double area sqrt(p * (p - a) * (p - b) * (p - c));cout fixed setprecision(1) area endl;return 0; } using namespace std;double a,b,c;int main() {cin a b c;double p (a b c) / 2;double area sqrt(p * (p - a) * (p - b) * (p - c));printf(%.1f\n,area);return 0; }  //输入两个整数mn整数输出yes,否则输出no  #include iostream #include cstdiousing namespace std;int main() {int a,b;cin a b;if (a % b 0){cout yes endl;}else{cout no endl;}return 0; } //输入两个整数比较其大小 //输出  #include iostream #include cstdio #include cmath #include iomanip using namespace std;int main() {long long x,y;cin x y;if(x y)cout endl;else if(x y)cout endl;elsecout endl;return 0; }//输入一个浮点数输出其绝对值 //保留小数点后两位 //---只是浮点数--float #include iostream #include cstdio #include cmath #include iomanip using namespace std;int main() {float n;cin n; if(n 0)printf(%.2f\n,-n);elseprintf(%.2f\n,n);return 0; }但是这个还有其他的解法//fabs--专用来求浮点数绝对值的函数  //--头文件cmathint main() {float n;cin n; n fabs(n);    printf(%.2f\n,n);return 0; }拓展一下~abs----专门计算整数的绝对值的其所需头文件---cstdlib#include iostream #include cstdlibusing namespace std;int main() {int n;cin n;int m abs(n);cout m endl;} //奇偶数判断 //n是奇数 输出odd //n是偶数 输出even //-100 n 100 #include iostream #include cstdio #include cmath #include iomanip  #include cstdlibusing namespace std;  int main() {int n;cin n;if(n % 2 1)cout odd endl;else if(n % 2 -1)cout odd endl;elsecout even endl;    return 0;}   //还有其他写法  int main() {int n;cin n;if(n % 2)cout odd endl;else if(n % 2 -1)cout odd endl;elsecout even endl;    return 0;} //学生成绩 //输入3个0~100的数字 //输出 该学生刚好有一门不及格输出1否则输出0 #include iostream #include cstdiousing namespace std;int main() {int s1,s2,s3;int cnt 0;cin s1 s2 s3;if(s1 , 60)cnt;if(s2 60)cnt;if(s3 60)cnt;if(cnt 1)cout 1 endl;elsecout 0 endl;return 0; }//另一种做法 int main() {int s1,s2,s3;cin s1 s2 s3; if((s1 60)(s2 60)(s3 60)1)cout 1 endl;elsecout 0 endl;return 0;} //等差数列末项计算 //输入三个整数a1,a2,n,(-100a1,a2100,0n1000;) //输出一个整数即第n项的值 #include iostream #include cstdiousing namespace std;int main() {int a1,a2,n;cin a1 a2 n;if(n 1)cout a2 endl;else if(n 2)cout a2 endl;elsecout a2 (n - 2)*(a2 - a1) endl; return 0;}
http://www.pierceye.com/news/97042/

相关文章:

  • 昆明网站空间好习惯网站
  • 做导航网站赚钱吗建立网站需要多少钱费用
  • 大同网站建设哪家好网站后台登录模板html
  • 网站建设过程中准备的工作手机制作网站
  • 做专业网站设计多少钱代理小企业网站建设
  • 怎样提升网站关键词免费的html模版下载
  • 栖霞网站定制三合一建站网站
  • 免费建立一个个人网站设计官网登录入口
  • 门户网站模板之家北京网上服务平台
  • 合肥网站优化方案东莞做网站那家好
  • 个人备案网站可以做论坛吗山东住房建设厅官网站首页
  • 寺院网站模板网站策划制作公司 北京
  • 昆山教育云平台网站建设宁晋县建设局网站
  • 廊坊网站公司dw做网站背景音乐
  • 阜南做网站搜索引擎优化seo多少钱
  • 贵州建设厅网站怎样查询电工证天津网站备案
  • 常州做网站的公司在盐城做网站的网络公司电话
  • seo站外推广如何用wampp 做网站
  • 怎样用手机做网站中企动力百度百科
  • 哪些网站可以做任务挣钱免费app软件
  • 国内简约网站平潭县机场建设网站
  • wordpress 全站通知wordpress怎样打开速度快
  • 广州市建设职业培训学校网站移除wordpress版本
  • 如何申请一个网站 新网动画制作大师
  • 动易后台 网站统计调查 报表类型怎样使用手机相册备份网站源码
  • 做网站放到百度上需要什么查看wordpress使用什么主题
  • 深圳企业网站seo郑州汉狮专业做网站公司
  • 广东网站建设多少钱辛集专业网站建设
  • 怎样做网站公司的销售小程序推广计划怎么赚钱
  • 网站开发文档编写wordpress小说站群