Skip to content

Instantly share code, notes, and snippets.

@rkhang7
Created November 24, 2018 09:12
Show Gist options
  • Select an option

  • Save rkhang7/97f48baa20925e17678acb4b86bf2b88 to your computer and use it in GitHub Desktop.

Select an option

Save rkhang7/97f48baa20925e17678acb4b86bf2b88 to your computer and use it in GitHub Desktop.
// tim n nho nhat sao cho 1+2...n<100000
#include <stdio.h>
#include <conio.h>
int main()
{
long s=0,i;
for(i=1;i<=10000;i++)
{
s=s+i;
if(s>10000)
break;
}
printf("So can tim la : %d\t",i);
getch();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment