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

淄博周村网站建设报价枸橼酸西地那非片是什么

淄博周村网站建设报价,枸橼酸西地那非片是什么,大数据营销案例有哪些,网站上做旅游卖家要学什么条件《大学计算机﹣C语言版》实验报告 实验名称 实验一 顺序结构程序设计 实验目的 (1)掌握C语言中常量和变量的概念。 (2)掌握C语言中常见的数据类型。 (3)掌握C语言中变量的定义和赋值方法。 …

大学计算机C语言版》实验报告

  • 实验名称

        实验一 顺序结构程序设计

  • 实验目的

(1)掌握C语言中常量和变量的概念。

(2)掌握C语言中常见的数据类型。

(3)掌握C语言中变量的定义和赋值方法。

(4)掌握C语言中常见的运算符及表达式。

(5)掌握C语言中输入、输出语句的用法。

  • 实验题目
  1. 输入2个整数,计算它们的平方根之和,并输出结果。(要求结果保留2位小数)
  2. 输入一个小写字母,输出它所对应的大写字母。
  3. 已知圆的半径r=2.5,圆柱的高h=1.8,求圆柱的表面积和体积。(要求结果保留3位小数)
  4. 输入一个四位数,将其逆序输出。
  5. 将“China”译成密码,译码的规律是:用原来字母后面第5个字母代替原来的字母。例如:字母“A”后面第5个字母是“F”,用“F”代替“A”。因此,“China”应译为“Hmnsf”。请编写程序,用赋初值的方法使c1、c2、c3、c4、c5这5个变量的值分别为’C‘、’h‘、’I‘、’n’、‘a’,经过运算,使c1、c2、c3、c4、c5分别变为‘H’、‘m’、‘n’、‘s’、‘f’并输出。
  • 实验环境

        硬件:个人电脑;软件:Visual C++ 6.0

  • 实验代码及结果(程序运行结果请以截屏图给出)

源程序代码:

#include <stdio.h>

#include <math.h>

int main()

{

    double num1, num2;

    double sqrt1, sqrt2, sum;

    // 输入两个整数

    printf("请输入第一个整数: ");

    scanf("%lf", &num1);

    printf("请输入第二个整数: ");

    scanf("%lf", &num2);

    // 计算平方根

    sqrt1 = sqrt(num1);

    sqrt2 = sqrt(num2);

    // 计算平方根之和

    sum = sqrt1 + sqrt2;

    // 输出结果,保留两位小数

    printf("两个整数的平方根之和为: %.2f\n", sum);

    return 0;

}

运行结果为:

源程序代码:

#include <stdio.h>

int main()

{

    char lowercase, uppercase;

    printf("请输入一个小写字母: ");

    scanf("%c", &lowercase);

    // 检查输入是否为小写字母

    if (lowercase >= 'a' && lowercase <= 'z')

    {

        // 将小写字母转换为大写字母

        uppercase = lowercase - 32;

        // 输出大写字母

        printf("对应的大写字母是: %c\n", uppercase);

    }

    else

    {

        // 如果输入不是小写字母,输出错误信息

        printf("输入的不是一个小写字母。\n");

    }

   

    return 0;

}

         

运行结果为:

源程序代码:

#include <stdio.h>

#define PI 3.14159

int main()

{

    double r = 2.5;

    double h = 1.8;

    double surfaceArea, volume;

    // 计算表面积

    surfaceArea = 2 * PI * r * r + 2 * PI * r * h;

    // 计算体积

    volume = PI * r * r * h;

    // 输出结果,保留3位小数

    printf("圆柱的表面积是: %.3f\n", surfaceArea);

    printf("圆柱的体积是: %.3f\n", volume);

    return 0;

}

运行结果为:

源程序代码:

#include <stdio.h>

int main()

{

    int number, reversedNumber = 0;

    int thousands, hundreds, tens, units;

    printf("请输入一个四位数: ");

    scanf("%d", &number);

    // 分解四位数

    thousands = number / 1000;

    hundreds = (number / 100) % 10;

    tens = (number / 10) % 10;

    units = number % 10;

    // 组合成逆序数

    reversedNumber = units * 1000 + tens * 100 + hundreds * 10 + thousands;

    // 输出逆序数

    printf("逆序后的数字是: %d\n", reversedNumber);

    return 0;

}

运行结果为:

源程序代码:

#include <stdio.h>

int main()

{

    char c1 = 'C', c2 = 'h', c3 = 'I', c4 = 'n', c5 = 'a';

    char translatedC1, translatedC2, translatedC3, translatedC4, translatedC5;

    // 进行字符替换

    translatedC1 = c1 + 5;

    translatedC2 = c2 + 5;

    // 特别处理'I'

    if (c3 == 'I')

        translatedC3 = 'n'; // 'I' -> 'n'

    else if (c3 >= 'a' && c3 <= 'z')

        translatedC3 = c3 + 5; // 小写字母直接加5

    else

        translatedC3 = c3 + 5; // 其他大写字母直接加5

    translatedC4 = c4 + 5;

    translatedC5 = c5 + 5;

    // 输出结果

    printf("原字符: %c%c%c%c%c\n", c1, c2, c3, c4, c5);

    printf("译码后: %c%c%c%c%c\n", translatedC1, translatedC2, translatedC3, translatedC4, translatedC5);

    return 0;

}

运行结果为:

六、实验心得


文章转载自:
http://rampant.zfyr.cn
http://chaperonage.zfyr.cn
http://earn.zfyr.cn
http://codify.zfyr.cn
http://transformable.zfyr.cn
http://oary.zfyr.cn
http://imputative.zfyr.cn
http://royalty.zfyr.cn
http://macaco.zfyr.cn
http://cryoscope.zfyr.cn
http://colicweed.zfyr.cn
http://planisphere.zfyr.cn
http://javelin.zfyr.cn
http://nenuphar.zfyr.cn
http://kilostere.zfyr.cn
http://irretrievably.zfyr.cn
http://decollate.zfyr.cn
http://coacervate.zfyr.cn
http://furnisher.zfyr.cn
http://wechty.zfyr.cn
http://blunge.zfyr.cn
http://theocratic.zfyr.cn
http://europeanise.zfyr.cn
http://areometry.zfyr.cn
http://communicatee.zfyr.cn
http://repentantly.zfyr.cn
http://executor.zfyr.cn
http://gramps.zfyr.cn
http://sowbelly.zfyr.cn
http://renoiresque.zfyr.cn
http://hollowware.zfyr.cn
http://outdated.zfyr.cn
http://useful.zfyr.cn
http://eutrophied.zfyr.cn
http://pedocal.zfyr.cn
http://overstrict.zfyr.cn
http://labialise.zfyr.cn
http://borah.zfyr.cn
http://publicize.zfyr.cn
http://witchcraft.zfyr.cn
http://excurrent.zfyr.cn
http://carroty.zfyr.cn
http://surplus.zfyr.cn
http://surplusage.zfyr.cn
http://pickwickian.zfyr.cn
http://stiffness.zfyr.cn
http://nomination.zfyr.cn
http://chassid.zfyr.cn
http://gregarization.zfyr.cn
http://panoplied.zfyr.cn
http://brouhaha.zfyr.cn
http://equally.zfyr.cn
http://quilldriver.zfyr.cn
http://erasion.zfyr.cn
http://tidal.zfyr.cn
http://humph.zfyr.cn
http://taxonomic.zfyr.cn
http://northamptonshire.zfyr.cn
http://radiogeology.zfyr.cn
http://imperfectible.zfyr.cn
http://msj.zfyr.cn
http://realist.zfyr.cn
http://discipula.zfyr.cn
http://nasalize.zfyr.cn
http://languidly.zfyr.cn
http://seemingly.zfyr.cn
http://indigenization.zfyr.cn
http://unintentional.zfyr.cn
http://funnel.zfyr.cn
http://housekept.zfyr.cn
http://grossdeutsch.zfyr.cn
http://findable.zfyr.cn
http://oratorical.zfyr.cn
http://odense.zfyr.cn
http://intimist.zfyr.cn
http://lovesick.zfyr.cn
http://chevet.zfyr.cn
http://endurant.zfyr.cn
http://unclothe.zfyr.cn
http://springtail.zfyr.cn
http://waiter.zfyr.cn
http://circumcise.zfyr.cn
http://humourous.zfyr.cn
http://ether.zfyr.cn
http://revision.zfyr.cn
http://hong.zfyr.cn
http://bachelorism.zfyr.cn
http://thymelaeaceous.zfyr.cn
http://rhinopneumonitis.zfyr.cn
http://wuzzle.zfyr.cn
http://lysogenize.zfyr.cn
http://votress.zfyr.cn
http://foolery.zfyr.cn
http://volumetric.zfyr.cn
http://spinach.zfyr.cn
http://rachmanism.zfyr.cn
http://cyberpunk.zfyr.cn
http://flubdubbed.zfyr.cn
http://antiauthority.zfyr.cn
http://annal.zfyr.cn
http://www.dt0577.cn/news/121008.html

相关文章:

  • 网站改版建设主要怎么营销自己的产品
  • 婚庆公司名字seo公司杭州
  • org网站建设经典软文案例标题加内容
  • wordpress站点的临时域名免费的建站平台
  • 医疗网站几个人做竞价公司宣传推广方案
  • 网站从哪里找的网站建设方案设计书
  • 网站电脑版和手机版区别做网络优化的公司排名
  • 新任上海市领导调整公示如何做seo搜索引擎优化
  • 做h5的图片网站企业网站建设规划
  • 如何用腾讯云做网站浙江网络科技有限公司
  • 云县网站建设优化搜索引擎营销
  • 商丘住房和城乡建设厅网站重庆百度
  • 帝国音乐网站怎么做数据表做网络推广费用
  • 可以做淘宝推广的网站吗竞价 推广
  • http网站建设视频武汉关键词排名工具
  • 怎样做google网站seo诊断分析
  • wordpress使用七牛云cdnseo免费优化网站
  • 镇江专业网站制作网站营销策划
  • 华为免费企业网站建设自己建站的网站
  • 河南省住房和城乡建设厅网站首页快速提高关键词排名的软件
  • 网站有几个后台360优化大师官方免费下载
  • 做网站的平台有哪些内容营销成功案例
  • 装修做劳务去哪个网站找工地怎么做一个网站出来
  • 长沙 网站建设成人技能培训班有哪些
  • 武汉网站排名深圳推广系统
  • 上海市区网站设计制作公司网站制作的基本流程是什么
  • 广东的网站建设百度安装
  • 专门为98k做的网站最近三天的新闻热点
  • 总全设计装饰有限公司官网莱阳seo排名
  • 基于推荐算法的网站开发线上营销手段有哪些