Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1.  
  2. Wszystkie trzy powyższe funkcje mają być wywołane z main()
  3. W main() należy jawnie przechowywać pośrednie dane.*/
  4. #include<stdio.h>
  5. #include<windows.h>
  6. main(){
  7. float x;
  8. int a,c;
  9. //pobieranie danych
  10. do{
  11. printf("Podaj liczbe nie mniejsza od2");
  12. scanf("%f",&x);
  13. if(x<2){
  14. printf("Podales bledna liczbe!\n");
  15. Beep(300,500);
  16.  
  17. }
  18. }while(x<2);
  19. //obliczenia
  20. a-1;
  21. for(c=2;c<=x;c++)
  22. a=a+c;
  23. //wydruk danych
  24. printf("iloczyn liczb calkowitych do:%f wlacznie",x);
  25. printf("wynosi %d\n",a);
  26. Beep(523,200);
  27. Beep(660,200);
  28. Beep(782,200);
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement