#include <stdio.h>

int main() {
    int a[7];
    int x,y,j;
    for(int i=0;i<7;i++)
{
    scanf("%d",&a[i]);
    if(a[i]%2!=0)
    {
        x+=a[i];
    }
}
    for(int i=0;i<7;i++)
    {
        for(j=i-1;j<6;j++)
        {
            y=a[i];
            if(a[j]>y)
            {
                a[j]=a[j+1];
            }
        }
         a[j+1]=y;
    }
    for(int i=0;i<7;i++)
    {
        printf("%d\n",a[i]);
    }
    printf("%d\n",x);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: