#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的更多相关文章

  1. An interesting experiment on China’s censorship

    This paper presented a very interesting topic. Censorship in China has always drawn people's attenti ...

  2. 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 ...

  3. ural 2062 Ambitious Experiment

    2062. Ambitious Experiment Time limit: 3.0 secondMemory limit: 128 MB During several decades, scient ...

  4. [POJ3684]Physics Experiment

      Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 1363   Accepted: 476   Special Judge ...

  5. poj 3684 Physics Experiment(数学,物理)

    Description Simon ), the first ball is released and falls down due to the gravity. After that, the b ...

  6. ural2062 Ambitious Experiment

    Ambitious Experiment Time limit: 3.0 secondMemory limit: 128 MB During several decades, scientists f ...

  7. Codeforces 431E Chemistry Experiment 线段树 + 二分

    Chemistry Experiment 维护一个权值线段树,然后二分答案. #include<bits/stdc++.h> #define LL long long #define LD ...

  8. ural Ambitious Experiment 树状数组

    During several decades, scientists from planet Nibiru are working to create an engine that would all ...

  9. 20162314 Experiment 2 - Tree

    Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...

  10. 20162314 Experiment 1: Linear structure - experiment report.

    Experiment report of Besti course:<Program Design & Data Structures> Class: 1623 Student N ...

随机推荐

  1. java Page分页显示

    //entity层实体类 import java.util.List; //分页展示 //相关属性:当前页,页大小(每页显示的条数),总页数,总条数,数据 //select * from t_user ...

  2. Hadoop2.0环境安装

    0. Hadoop源码包下载 http://mirror.bit.edu.cn/apache/hadoop/common 1. 集群环境 操作系统 CentOS7 集群规划 Master 192.16 ...

  3. Mac谷歌浏览器跨域

    1.创建一个文件夹,这个文件夹是用来保存关闭安全策略后的用户信息的,名字可以随意取,位置也可以随意放,我用的是MyChromeDevUserData open -n /Applications/Goo ...

  4. Ubuntu16.04 导入tensorflow报错

    错误1:Traceback (most recent call last):  File "/home/lwc/anaconda3/lib/python3.6/site-packages/t ...

  5. react组建生命周期

    实例化 首次实例化 getDefaultProps   //创建默认 props getInitialState     //创建 默认的State componentWillMount   //在装 ...

  6. mac下新建txt文本快捷方式.md

    转:127.0.0.1:47873/help/0-436/ms.help?method=page&id=A38C5670-BA28-44F3-BD5B-FCB46880E904&pro ...

  7. True和数字相加的结果

    num = 5 print(num + True) # 其结果为6

  8. RPC web service

    ---------------------------------------------------------------------------------------------------- ...

  9. MySQL编码不一致导致查询结果为空

    升级数据库后(5.1到8.0),发现一个奇怪的问题,某些页面在升级前可以正常查询,但升级后什么也查不出来了,有时候还会查出错误的结果.经过一整天的排查,终于发现由两个原因导致,现记录如下. 第一是数据 ...

  10. day51 JS基础

    复习 1.字体图标 用i标签, 设置类名, 与第三方字体图标库进行图标匹配 <link rel="stylesheet" href="font-awesome-4. ...