Skip to content

Instantly share code, notes, and snippets.

@rkhang7
Created November 17, 2018 01:58
Show Gist options
  • Save rkhang7/855d1b007fbdc156e7f5c6b941518060 to your computer and use it in GitHub Desktop.
Save rkhang7/855d1b007fbdc156e7f5c6b941518060 to your computer and use it in GitHub Desktop.
// tong so le
#include <stdio.h>
#include <conio.h>
int main()
{
int x[3];
int s=0;
for(int i=0;i<3;i++)
{
printf("Nhap 3 so: ");scanf("%d",&x[i]);
}
for(int i=0;i<3;i++)
if(x[i]%2!=0)
{
s=s+x[i];
}
printf("Tong so le la %d",s);
getch();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment