Skip to content

Instantly share code, notes, and snippets.

@salvianoo
Created May 19, 2012 20:03
Show Gist options
  • Save salvianoo/2732243 to your computer and use it in GitHub Desktop.
Save salvianoo/2732243 to your computer and use it in GitHub Desktop.
n1
#include <iostream>
using namespace std;
int main (int argc, char * const argv[]) {
int sum = 0;
for (int x = 0; x <= 100; x++) {
sum += x;
}
cout << "A soma dos cem primeiros números inteiros é: \n";
cout << sum;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment