Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Wszystkie trzy powyższe funkcje mają być wywołane z main()
- W main() należy jawnie przechowywać pośrednie dane.*/
- #include<stdio.h>
- #include<windows.h>
- main(){
- float x;
- int a,c;
- //pobieranie danych
- do{
- printf("Podaj liczbe nie mniejsza od2");
- scanf("%f",&x);
- if(x<2){
- printf("Podales bledna liczbe!\n");
- Beep(300,500);
- }
- }while(x<2);
- //obliczenia
- a-1;
- for(c=2;c<=x;c++)
- a=a+c;
- //wydruk danych
- printf("iloczyn liczb calkowitych do:%f wlacznie",x);
- printf("wynosi %d\n",a);
- Beep(523,200);
- Beep(660,200);
- Beep(782,200);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement