Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- int main()
- {
- int count = 2;
- int sum = 0;
- int tal;
- printf("Skriv in tal: ");
- scanf("%d", &tal);
- while (count <= tal)
- {
- sum+=count;
- count++;
- count++;
- }
- printf("%d", sum);
- getchar();
- getc(stdin);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement