Introduction
In this lab, you will learn how to create a program to find the sum of n integers using an array. You will use C programming language to create the program.
Note: You need to create the file
~/project/main.c
yourself to practice coding and learn how to compile and run it using gcc.
cd ~/project
## create main.c
touch main.c
## compile main.c
gcc main.c -o main
## run main
./main
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
c(("C")) -.-> c/CompoundTypesGroup(["Compound Types"])
c(("C")) -.-> c/UserInteractionGroup(["User Interaction"])
c(("C")) -.-> c/BasicsGroup(["Basics"])
c(("C")) -.-> c/ControlFlowGroup(["Control Flow"])
c/BasicsGroup -.-> c/operators("Operators")
c/BasicsGroup -.-> c/comments("Comments")
c/ControlFlowGroup -.-> c/for_loop("For Loop")
c/CompoundTypesGroup -.-> c/arrays("Arrays")
c/UserInteractionGroup -.-> c/user_input("User Input")
c/UserInteractionGroup -.-> c/output("Output")
subgraph Lab Skills
c/operators -.-> lab-123344{{"Sum of N Integers Using Arrays"}}
c/comments -.-> lab-123344{{"Sum of N Integers Using Arrays"}}
c/for_loop -.-> lab-123344{{"Sum of N Integers Using Arrays"}}
c/arrays -.-> lab-123344{{"Sum of N Integers Using Arrays"}}
c/user_input -.-> lab-123344{{"Sum of N Integers Using Arrays"}}
c/output -.-> lab-123344{{"Sum of N Integers Using Arrays"}}
end