1. #include <stdio.h>
  2. int main() {
  3. int number, max, min, n;
  4.  
  5. n=;
  6. printf("请输入%d个数: ", n);
  7. scanf("%d", &number);
  8.  
  9. max = number;
  10. min = number;
  11.  
  12. while(n<=) {
  13. n++;
  14. printf("请输入第%d个数: ", n);
  15. scanf("%d", &number);
  16.  
  17. if(number>max)
  18. max = number;
  19. else if(number<min)
  20. min = number;
  21. }
  22.  
  23. printf("最大数为: %d\n", max);
  24. printf("最小数为: %d\n", min);
  25.  
  26. return ;
  27. }

  1. #include <stdio.h>
  2. int main()
  3. {
  4. int i = ;
  5. int j = ;
  6. for (i = ; i <=; i+=)
  7. {
  8. for (j = ; j<=i; j++)
  9. {
  10. if ( == i%j)
  11. {
  12. break;
  13. }
  14. }
  15. if (j == i)
  16. printf("%d ",i);
  17. }
  18.  
  19. return ;
  20. }

  1. #include <stdio.h>
  2. int trangle(int n)
  3. {
  4. int i,j;
  5. for(i = ;i<n;i++)
  6. {
  7. for(j = ;j<=n-i;j++)
  8. putchar(' ');
  9. for(j = ;j<=*i;j++)
  10. putchar('*');
  11. putchar('\n');
  12. }
  13. return ;
  14. }
  15.  
  16. int main()
  17. {
  18. int n;printf("Enter n:");
  19. scanf("%d",&n);
  20. printf("\n");
  21. trangle(n);
  22. return ;
  23. }

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

    一.hello world 明确的指出 hello.py 脚本由 python 解释器来执行.coding:utf-8处理脚本中的中文 #!/usr/bin/env python # _*_ codi ...

  2. anaconda安装Opencv报错:Could NOT find PythonLibs: Found unsuitable version "2.7.6",

    机器上装了两个python,一个是默认的,一个是anaconda.安装opencv时就报错了: -- Found PythonInterp: /home/deeplp/anaconda2/bin/py ...

  3. 逃逸分析(Escape Analysis)

    一.什么是逃逸 逃逸是指在某个方法之内创建的对象,除了在方法体之内被引用之外,还在方法体之外被其它变量引用到:这样带来的后果是在该方法执行完毕之后,该方法中创建的对象将无法被GC回收,由于其被其它变量 ...

  4. 自定义 serializeJSON() 函数

    说明:jQuery框架提供了serialize()方法, 能够将DOM元素内容序列化为json格式字符串,用于ajax请求.通过使用serialize()方法,可以提交本页面的所有域. 但是此方法具有 ...

  5. makefile(一)

    Makefile的一个具体的实例 来源:http://blog.sina.com.cn/s/blog_73d4d5fa0100paiy.html (2011-03-06 23:10:02) 转载▼ 标 ...

  6. jquery通过AJAX从后台获取信息并显示在表格上的类

    前一阵我写了:<jquery通过AJAX从后台获取信息并显示在表格上,并支持行选中.>现在,我把他们处理了一下,不需要每次写代码了: 具体代码如下: //获取数据并显示数据表格 funct ...

  7. FileStream说明

    FileStream(String, FileMode)    FileStream(String path, FileMode) 文件打开模式:(FileMode)包括6个枚举 Append:追加  ...

  8. 吴裕雄 python 机器学习——岭回归

    import numpy as np import matplotlib.pyplot as plt from sklearn import datasets, linear_model from s ...

  9. OpenCV4.0学习笔记

    1.读取显示图像 #include<opencv2/opencv.hpp> #include<iostream> using namespace cv; using names ...

  10. linux下面重启nfs报错:nfs-server.service:main process exited

    linux下面重启nfs报错:nfs-server.service:main process exited [root@dhcp-66-83-39 images]# service rpcbind s ...