Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n,c1,c2,s;
- int main()
- {
- cin>>n;
- while(n>100)
- n/=10;
- c2=n%10;
- c1=n/10;
- s=c1+c2;
- cout<<s;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement