Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  compute
Language: C/C++
Code:

          #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
     float x,t,y,N1,N2,N3;
     int N;
     double y1,y2;
     printf("请输入规格后一位:");
     scanf("%f",&x);
     printf("请输入重量:");
     scanf("%f",&t);
     printf("请输入总质量:");
     scanf("%f",&N3);
     y1=x/0.35;
     y2=y1*t;
     y=x*t;
     if(y>=21){
          N1=(1500/y2)*y1;     
     }else{
          N1=25*y1;
     }
     N2=N3/N1;
     N=ceil(N2);
     printf("需要井字形堆数为%d\n",N);
     return 0;
}
Comments: