C语言编程,求解,急用
1、include <stdio.h> main(){int n;printf("请输入分钟数:");scanf("%d",&n);if(n>24*60)printf("%d分钟相当于%d小时%d分钟\\n",n,n\/60,n%60);else printf("%d分钟相当于%d天%d小时%d分钟\\n",n,n\/(24*60),n%(24*60)\/60,n%(24*60)%60);} 2、include <stdio.h> main...
C语言,急急急!!!
K是用来存放各个位上相加之和的变量 k=0;for(i=0;i<strlen(s1);i++) if(s1[i]=='.') s[i]='.';循环 小数点直接输入 else{ if(s1[i]>='A') k=k+s1[i]-'A'+10; else k=k+s1[i]-'0';如果第I位大于A 转化成十进制数 ELSE 直接相加 if(s2[i]>='A') k=k+s2...
大家帮帮忙很急啊C语言的编程解释
int main(){ int i,j,a[100];for (i=2;i<100;i++){ a[i]=i;\/\/初始化 for (j=2;j<100;j++){ if(j<i)\/\/如果j
急!急!简单c语言编程题,求编写代码
\/\/第一题#include<stdio.h>void fun(int n){ int i,j,k,t;for(k=0;k<n;k++)\/\/控制总行数{ for(i=0;i<n-k-1;i++)\/\/控制输出空格,因为空格不好看见,就用*代替 printf("%c",'*'); for(j=0;j<2*k+1;j++)\/\/控制输出字母 { printf("%c",65+j)...
c语言!!!急急急!!!
include <stdio.h>void main(){float a,b,c,dlt;printf("请输入a、b、c: ");scanf("%f%f%f",&a,&b,&c);if(a){dlt=b*b-a*c*4;if(dlt>0)printf("x1=%f\\nx2=%f",(-b+sqrt(dlt))\/(a*2),(-b-sqrt(dlt))\/(a*2));else if(dlt<0)printf("x1=%f+%fi\\nx2=%f-%fi...
c语言编程急急急
C语言程序:include <stdio.h>void main() {double weight;\/* 包裹重量 *\/double distance;\/* 邮寄距离 *\/double fee;\/* 邮资 *\/printf("包裹重量(克):");scanf("%lf", &weight);printf("邮寄距离(公里):");scanf("%lf", &distance);if(weight < 15){fee = 5;}else if(weight ...
c语言编程题,请高手帮忙做一下,拜谢,急急急急……
1.include <stdio.h> double funcPi(int);int main(void){ int arg;printf("Input the argument: ");\/\/ \/\/ 无异常输入 \/\/ while (!scanf("%d", &arg)){ printf("Check your input and retry: ");while (getchar()!='\\n'){ continue;} } while (getchar()!='\\n'){ continue...
c语言 急!!
void paixu(double *m,int y,int z){ int i;double k;bool j=true;while(j){ j=false;for(i=y;i<z-1;i++)if(m[i]>m[i+1]){ k=m[i];m[i]=m[i+1];m[i+1]=k;j=true;}} } int main(void){ int a,c,b;printf("请输入你需要的数组长度(偶数):");scanf("%d"...
c语言编程求助,越多越好我可以加,一题也行,感谢大神!
1#include<stdio.h>int prime(int n){ int flag=1; if(n<=1) return 0; for(int i=2;i*i<=n;i++){ if(n%i==0){ flag=0; break; } } if(flag) return 1; else return 0;}int main(){ int t; scanf("%d",&t); if(prime(t...
...求高手解答啊。新手很不明白。6月19号之前需要用到。急急急...
int a[N][N],b[N][N],c[N][N],n=4;void main(){ int i,j;printf("请输入矩阵维数2-10:\\n");scanf("%d",&n);printf("请输入矩阵A:\\n");for(i=0;i<n;i++){ printf("第%d行数据:\\n",i+1);for(j=0;j<n;j++)scanf("%d",&a[i][j]);} printf("请输入矩阵...