Search
 
SCRIPT & CODE EXAMPLE
 

C

sum of list in C

#include <stdio.h>

void main() {
	int List[5] = { 1, 2, 3, 4, 5 };
	int sum = 0;
	for (int i = 0; i < 5; i++) {
		sum += List[i];
	}
	printf("%d", sum);
}
Comment

PREVIOUS NEXT
Code Example
C :: sdl draw Rectf 
C :: how to print helloq world in c 
C :: come creare variabili casuali in c 
C :: how to auto run something on cmd 
C :: close file in c 
C :: how to get user input in c 
C :: font awsome circle info icon 
C :: print 2d array in c 
C :: successeur d’un entier donné 
C :: two bytes to int c 
C :: Call by reference to pass an array to the function in C- 
C :: block a website on mac 
C :: c convert integer to string 
C :: divide and conquer program in c 
C :: get last char string c 
C :: c program to find minimum of 4 numbers using conditional operator in c 
C :: install gnome tweaks ubuntu 20.04 
C :: bitwise operators in c 
C :: copy string in c 
C :: memcpy c 
C :: hello word in c 
C :: functions in c 
C :: how to compareTo in java 
C :: program to find the average of n numbers using arrays. 
C :: array of strings in c 
C :: how to return array of char in c 
C :: pyinstaller hidden import tensorflow not found 
C :: fread 
C :: how to read from a file in c 
C :: calling of a void in c 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =