Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void)
- {
- int suma = 0, n = 0;
- int max;
- printf("Podaj max: ");
- scanf("%d",&max);
- while (suma < max)
- {
- n++;
- suma = suma + 2;
- }
- suma = suma - n;
- n--;
- printf("Ilosc liczb: %d\n",n);
- printf("Suma liczb: %d\n",suma);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement