题目内容

运行以下程序,输入2 10,写出程序运行结果。#include #include int fun(int m);int main(){int count, i, m, n, sum;int prime(int m);scanf("%d%d", &m, &n);count = sum = 0;for(i = m; i <= n; i++)if(fun(i) != 0){count++;sum = sum + i;}printf("%d#%d\n", count, sum);}int fun(int m){int k, i;if(m == 1) return 0;k = sqrt(m);for(i = 2; i <= k; i++)if(m % i == 0) return 0;return 1;}

查看答案
更多问题

运行以下程序,输入1 4 3 0 2,写出程序运行结果。#include void ReadData(int a[], int n);void PrintData(int a[], int n);void fun(int a[], int n);void Swap(int *x, int *y);int main(){int a[5];ReadData(a, 5);fun(a, 5);PrintData(a, 5);return 0;}void ReadData(int a[], int n){int i;for (i=0; i x){x = a[i];xPos = i;}if (a[i] < y){y = a[i];yPos = i;}}temp = a[xPos];a[xPos] = a[yPos];a[yPos] = temp;}void Swap(int *x, int *y){int temp;temp = *x;*x = *y;*y = temp;}

运行以下程序,输入1 2 3 4 5,写出程序运行结果。#include void mov(int *x, int n, int m);int main(void){int a[5], i, *p;for(p = a, i = 0; i < 5; i++)scanf("%d", p++);mov(a,5,3);printf("After moved: ");for(i = 0; i < 4; i++)printf("%d#",a[i]);printf("%d",a[4]);return 0;}void mov(int *x, int n, int m){int i,j,k;for(i = 0; i < m; i++){k=x[n-1] ;for(j = n-1; j > 0; j--)x[j] = x[j - 1];x[0] = k;}}

我国脱贫攻坚成果举世瞩目,全国共有( )个贫困县全部摘帽。

A. 832
B. 830
C. 831
D. 833

(),习近平总书记首次提出了中国梦,把中国梦定义为“实现中华民族伟大复兴,就是中华民族近代以来最伟大梦想”。

A. 2012.12.29
B. 2008.12.29
C. 2017.10.18
D. 2012.11.29

答案查题题库