Last active
December 15, 2015 21:59
-
-
Save toughrogrammer/5330010 to your computer and use it in GitHub Desktop.
시그마와 For문 비교입니다.
아래 소스코드의 sum 값은 시그마 i=0->4와 같습니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
int sum = 0; | |
int i; | |
for( i=0; i<5; i++ ) | |
{ | |
sum = sum + i; | |
} | |
printf("Sum : %d\n", sum); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment