Answers for "properties of loop in c++ and how it works"

C++
0

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;

}
Posted by: Guest on January-16-2022

Code answers related to "properties of loop in c++ and how it works"

Browse Popular Code Answers by Language