1.
#include<iostream>
using namespace std;
int main() {
int n, i;
cin >> n;
for (i = n; i >= 1; i--) {
cout << i <<" ";
}
return 0;
}
2.
#include<iostream>
using namespace std;
int main() {
int x,y, s = 0;
cin >> x;
while (x != 0) {
y = x % 10;
s = s + y;
x = x / 10;
}
cout << s;
return 0;
}