[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Doanhdz/cpp-programming/main/OOP1-Lab3/Digits.cpp [Back]  [Original]

//U1910049 Rastam Zokirov
//Lab assignment #4
//Program to input a number and then calculate sum of its digits.

#include 
using namespace std;
int main3() {
	int a, sum = 0;
	cout > a;
	while (a != 0) {
		sum = sum + a % 10;
		a = a / 10;
	}
	cout 

Web Proxy Viewer  |  New URL  |  Original Page