experiment 3
#include <stdio.h>
int main() {
int number, max, min, n; n=;
printf("请输入%d个数: ", n);
scanf("%d", &number); max = number;
min = number; while(n<=) {
n++;
printf("请输入第%d个数: ", n);
scanf("%d", &number); if(number>max)
max = number;
else if(number<min)
min = number;
} printf("最大数为: %d\n", max);
printf("最小数为: %d\n", min); return ;
}

#include <stdio.h>
int main()
{
int i = ;
int j = ;
for (i = ; i <=; i+=)
{
for (j = ; j<=i; j++)
{
if ( == i%j)
{
break;
}
}
if (j == i)
printf("%d ",i);
} return ;
}

#include <stdio.h>
int trangle(int n)
{
int i,j;
for(i = ;i<n;i++)
{
for(j = ;j<=n-i;j++)
putchar(' ');
for(j = ;j<=*i;j++)
putchar('*');
putchar('\n');
}
return ;
} int main()
{
int n;printf("Enter n:");
scanf("%d",&n);
printf("\n");
trangle(n);
return ;
}

part 1 answer:
1.
break语句:用于永久终止循环
continue语句:用于终止本次循环
2.
均不影响
experiment 3的更多相关文章
- An interesting experiment on China’s censorship
This paper presented a very interesting topic. Censorship in China has always drawn people's attenti ...
- Reading With Purpose: A grand experiment
Reading With Purpose: A grand experiment This is the preface to a set of notes I'm writing for a sem ...
- ural 2062 Ambitious Experiment
2062. Ambitious Experiment Time limit: 3.0 secondMemory limit: 128 MB During several decades, scient ...
- [POJ3684]Physics Experiment
Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1363 Accepted: 476 Special Judge ...
- poj 3684 Physics Experiment(数学,物理)
Description Simon ), the first ball is released and falls down due to the gravity. After that, the b ...
- ural2062 Ambitious Experiment
Ambitious Experiment Time limit: 3.0 secondMemory limit: 128 MB During several decades, scientists f ...
- Codeforces 431E Chemistry Experiment 线段树 + 二分
Chemistry Experiment 维护一个权值线段树,然后二分答案. #include<bits/stdc++.h> #define LL long long #define LD ...
- ural Ambitious Experiment 树状数组
During several decades, scientists from planet Nibiru are working to create an engine that would all ...
- 20162314 Experiment 2 - Tree
Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...
- 20162314 Experiment 1: Linear structure - experiment report.
Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...
随机推荐
- python学习(一)--python解释器
python学习模式,每篇都会有一些总结,然后根据总结去查一查,学一学,基础就会很扎实的 python解释器 1.python版本和安装 python2.x和python3.x https://www ...
- Git综合使用命令行和gui工具小结
使用Git的时候,综合使用命令行和gui工具,可以把Git用的最舒服,因此这里总结下使用gui和命令行的一些对应操作, gui中拉取:git pull origin dev_branch gui中推送 ...
- JVM-如何判断对象存活与否与CMS收集器和G1收集器的区别
JVM如何判断对象存活? 1.计数器 2.可达性分析 (很多主流语言采用这种方法来判断对象是否存活) 计数器:每当有一个地方引用该对象时,计数器 +1:引用失效则 -1: 优点:实现简单,判定效率 ...
- 上位机与三菱FX3U通过FX-232-BD通信
PLC侧设置: 和校验+协议4 读D200单字: 05 30 30 46 46 57 52 30 44 30 32 30 30 30 31 返回“201”:02 30 30 46 46 30 ...
- jupyter notebook 代码自动补齐插件
安装: . pip install jupyter_contrib_nbextensions -i https://pypi.mirrors.ustc.edu.cn/simple 2. jupyter ...
- html入门第二天。
二·1.图片与多媒体:-------------- img标签(重中之重): 网页中的图片展示就是用的img标签实现,img元素相网页中嵌入一幅图形,行内标签,单标签. 基础语句:<img sr ...
- tensorflow安装和初使用
本文的目的是为了复习并帮助刚开始起步使用机器学习的人员 1.安装准备 为了方便就在window上安装,我的是window10 的笔记本,首先准备python 因为tensorflow在仅仅支持wind ...
- MySQL基础概述
MySQL基础 1.目前属于Oracle 2.MySQL开源的关系型数据库管理系统 3.分为社区版和企业版 MySQL安装与配置 1.MSI安装 2.zip安装 MySQL目录结构 1.bin目录,存 ...
- Jupyter Notebook 快捷键使用指南
因为使用Jupyter Notebook用鼠标选择菜单影响效率,遂将快捷命令记录于此 转自:http://blog.konghy.cn/2017/05/04/jupyter-notebook-hotk ...
- linux学习笔记:vim程序编辑器—vim的使用
注:以下是学习<鸟哥的linux私房菜>(第三版)的学习笔记,纯属个人学习记录. 2018-11-19 一.学习vim的原因 很多软件的编辑接口都会主动调用vi 二.vim的使用 (1)v ...