#include <stdio.h> int main( void ) { double data1, data2; int i; data1 = 100.0; i = 1; while ( i <= 10 ) { printf( "浮動小数点数を入力 " ); scanf( "%lf", &data2 ); if ( data2 == 0.0 ) continue; data1 = data1 / data2; printf( "data1 = %f\n", data1 ); if ( data1 < 1.0 ) break; i++; } return 0; }
▼戻る▼
「初心者のためのポイント学習C言語」 Copyright(c) 2000-2004 TOMOJI All Rights Reserved