Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
RGB7010 - 3 оронтой тоо |
Өгөгдсөн 3 оронтой тооны цифрүүдийн нийлбэрийг ол.
Input
3 оронтой эерэг тоо өгөгдөнө.
Output
Цифрүүдийн нийлбэр.
Example
Input: 123 Output: 6
Нэмсэн: | Bataa |
Огноо: | 2011-05-10 |
Хугацааны хязгаарлалт: | 1s |
Эх кодын хэмжээний хязгаарлалт: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Програмчлалын хэлүүд: | ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE |
hide comments
|
||||||||||
2024-11-29 04:23:43
bagshaa guujiin tuhuu |
||||||||||
2024-11-26 08:00:48
miigaa undaagii chin uuchlaa uuchlaarai |
||||||||||
2024-11-25 05:29:01
#include <iostream> using namespace std; int main() { int n, zuut, aravt, negj, k; cin>> n; negj = n / 100; aravt = n / 10 % 10; zuut = n % 10; k = zuut + aravt + negj; cout<<k; return 0; } |
||||||||||
2024-11-13 03:01:15
#include <iostream> using namespace std; int main() { int a.b,c,d,e; cin >> a ; b = a % 10; c = ( a % 100 - b) -/10; d = ( a % 1000 - b - c) / 100; e = b + c + d; cout << e; return 0; } |
||||||||||
2024-11-05 11:03:44
hi? |
||||||||||
2024-10-07 13:38:17
#include<iostream> using namespace std; main(){ int a,a1,a2,a3; cin>>a; a1=a%10; a2=a%100/10; a3=a/100; a=a1+a2+a3; cout<<a; return 0; } sigma |
||||||||||
2024-05-20 04:21:22
#include<iostream> using namespace std; main(){ int a,a1,a2,a3; cin>>a; a1=a%10; a2=a%100/10; a3=a/100; a=a1+a2+a3; cout<<a; return 0; } |
||||||||||
2024-04-17 09:48:16
#include<bits/stdc++.h> using namespace std; int main(){ long a, b; cin>>a; b=(a/100)+(a/10%10)+(a%10%10); cout<<b; } |
||||||||||
2024-04-15 04:25:29
#include <iostream> using namespace std; int main() { int too,a,b,c,hairu; cin >> too; a = too % 10; b = too / 10 % 10; c = too / 100; hairu=a + b + c; cout<<hairu; return 0; } anir |
||||||||||
2024-03-07 03:03:19
#include <iostream> #include <sstream> #include <string> #include <cstdlib> #include <cmath> using namespace std; // Headers string toString (double); int toInt (string); double toDouble (string); int main() { int a, b, c, f; cin >> a; b = (int) (a / 100); f = a % 10; c = a / 10 % 10; cout << b+c+f << endl; return 0; } // The following implements type conversion functions. string toString (double value) { //int also stringstream temp; temp << value; return temp.str(); } int toInt (string text) { return atoi(text.c_str()); } double toDouble (string text) { return atof(text.c_str()); } anir |