1 solutions

  • 0
    @ 2025-11-5 15:31:54

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int a,s;
    int main()
    {
    	cin>>a;
    	for(int i=0;i<2;i++)
    	{
    		s+=a%10;
    		a/=10;
    	}
    	cout<<s;
    	return 0;
    }
    

    Pascal :

    var  a:integer;
    begin
      readln(a);
      writeln(a div 10+a mod 10);  
    end.
    
    • 1

    Information

    ID
    16893
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By