Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. //---------------------------------------------------------------------------
  2. #include<stdio>
  3. #include<stdlib>
  4. #include<conio>
  5. #pragma hdrstop
  6. //---------------------------------------------------------------------------
  7. #pragma argsused
  8. int main(int argc, char* argv[])
  9. {
  10. double Wert[10];
  11. int I=0;
  12.  
  13. printf("10 Werte ein/auslese Prog\n\n");
  14.  
  15. while(I!=10)
  16. {
  17. I++;
  18. printf("%i.Wert: ",I);
  19.  
  20. do
  21. {
  22. scanf ("%lf",&Wert[I]);
  23.  
  24. if((Wert[I]>10.0)||(Wert[I]<0.0))
  25. {
  26. printf("!!!WERTEBEREICH UEBERSCHRITTEN!!!\n\n");
  27. printf("%i.Wert: ",I);
  28. }
  29. }
  30. while ((Wert[I]>10.0)||(Wert[I]<0.0));
  31. }
  32.  
  33. printf("\n\n< Weiter mit beliebiger Taste >");
  34. getch();
  35. clrscr();
  36.  
  37.  
  38. I=0;
  39. printf("\n\n");
  40.  
  41. while(I!=10)
  42. {
  43. I++;
  44. printf("%i.Wert: %lf\n",I,Wert[I]);
  45. }
  46.  
  47. getch();
  48. return 0;
  49. }
  50. //---------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement