fork download
  1. #include <stdio.h>
  2. int main(){
  3. float diem;
  4. do {
  5. printf(" Nhap diem kiem tra:");
  6. scanf("%f", &diem);
  7. if ( diem<0 || diem>10){
  8. printf (" Diem khong hop le nhap lai");
  9. }
  10. }
  11. while( diem<0 || diem>10);
  12. printf(" Diem hop le: %.2f\n", diem);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0.01s 5316KB
stdin

stdout
 Nhap diem kiem tra: Diem hop le: 0.00