diff --git a/exercise1.c b/exercise1.c index ba9f281..b53e2ee 100644 --- a/exercise1.c +++ b/exercise1.c @@ -7,13 +7,30 @@ //global variable section -//main function section -int main(){ - //write here your program +//main function section +int main() +{ + int a = 1; + int b = 2; + int c = 3; + int d = 4; + int e = 5; + int f = 6; + int g = 7; + int h = 8; + int i = 9; + int j = 10; + + int sum; + + sum = a + b + c + d + e + f + g + h + i + j; + + printf("The sum of numbers from 1 to 10 is %d \n", sum); return 0; + } +//user-defined section -//user-defined section \ No newline at end of file