Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

properties of loop in c++ and how it works

#include <iostream>
int main(){

	using namespace std;
	int sum = 0, i, n;

	for(i = 0; i < 10; i++){

		cout << "Enter number" << endl;
		cin >> n;

		sum = sum + n;

	}
	cout << "Sum is " << sum << endl;

	return 0;

}
Source by www.codesdope.com #
 
PREVIOUS NEXT
Tagged: #properties #loop #works
ADD COMMENT
Topic
Name
8+2 =