#include int main() { int n, i, sum = 0; do ...vps.ns.ac.rs/materijal/mat22833.pdf · lampan...

Post on 30-Oct-2019

8 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

#include <stdio.h>

int main() {

int n, i, sum = 0;

do {

printf("Enter a positive integer: ");

scanf("%d",&n);

}

while (n <= 0);

for(i=1; i <= n; ++i) {

sum += i; // sum = sum+i;

}

printf("Sum = %d",sum);

return 0;

}

Predispitne obaveze: Ispit: 55 45

Prisustvo (predavanja i vežbe):

Kolokvijum II: (zadaci sa vežbi)

5

20

Kolokvijum I: (zadaci sa vežbi)

20

Aktivnost studenata: 10

• Materijal sa predavanja i vežbi

• Internet, biblioteka..

http://tutoriali.org/C.html

https://www.tutorialspoint.com/cprogramming/index.htm

Adresa za download: https://sourceforge.net/projects/orwelldevcpp/files/latest/download

Uputstvo za instalaciju: https://www.youtube.com/watch?v=X8d4yOqbRGw

top related