暨南大学の再试験に合格しました.1501

531 ワード

矩形正方形面積の問題
矩形がどれだけの正方形を収容することができることを求めます
#include
int main(){
	int a,b,c;
	printf("         :
"); do{ scanf("%d %d",&a,&b); if(a<0||b<0){ printf(" , :
"); } }while(a<0||b<0); printf(" :
"); do{ scanf("%d",&c); if(c<0){ printf(" , :
"); } }while(c<0); int tmp1,tmp2; tmp1=a/c; tmp2=b/c; printf(" %d ",tmp1*tmp2); return 0; }