当前位置: 首页 > 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.zqtcl.cn/news/185219/

相关文章:

  • 如何做网站静态页面商丘网签查询
  • 网站建设好学么模版型网站是怎样的
  • 网站维护建设费应计入科目高端营销型网站制作
  • 推荐几个好的网站wordpress 加载数据库表格也卖弄
  • 承德网站开发找人做网站安全吗
  • 百度网站推广电话眼镜网站怎么做竞价
  • 邢台建设银行官方网站为什么建设网站很多公司没有
  • 闵行做网站费用湖南正规网络营销哪家便宜
  • 找个公司做网站需要注意什么wordpress用户名长度
  • 推荐几个没封的正能量网站营销技巧和营销方法视频
  • html mip 网站桂林市临桂区
  • 做网站如何月入10万建行app怎么注册登录
  • 建设一个旅游网站毕业设计建设网站的功能定位是什么原因
  • wordpress网站导航模板杭州建设网站的公司
  • 如何做视频解析网站wordpress 关闭评论
  • 安福网站建设微信开发者工具怎么下载
  • 网罗设计网站威海网页设计制作公司
  • 网站用cmswordpress插件怎么做
  • 如何办好公司网站元器件网站搭建
  • 建设领域行政处罚查询网站wordpress数据库发文章
  • 怎么做网页的多开器宿迁seo优化
  • 别人帮做的网站怎么修改病句店铺引流的30种方法
  • 网站备案幕布怎么申请绍兴cms建站模板
  • 做网站熊掌号软件设计公司排名
  • 深圳 做网站学做西点的网站
  • 静态网站安全性百度服务平台
  • 网站vi设计公司网站建设app
  • 书店网站建设策划书总结每天看七个广告赚40元的app
  • 做网站的属于什么专业成都广告制作安装公司
  • 天津市网站建设公司网站制作费用