Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4. #include <math.h>
  5.  
  6. int main()
  7. {
  8. int ganzzahl;
  9. double i=1.0;
  10. char weiter='j';
  11. double amk=1.0;
  12.  
  13. printf("GEBEN SIE EINE GANZZAHL AN AMK\n");
  14. scanf("%i", &ganzzahl);
  15.  
  16. while(weiter!='n')
  17. {
  18. while((i+amk)*1.0*(i+amk)*1.0<=ganzzahl)
  19. {
  20. i+=amk;
  21. i*=1.0;
  22. }
  23. amk/=10;
  24. printf("Ergebnis:\t %lf\nWeiter?\n", i);
  25. scanf("%c", &weiter);
  26. }
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement