Computer Science, asked by muskan481367, 1 year ago

write a program to initialize four digit number print the sum of only last two digit​

Answers

Answered by sswaraj04
0

Answer:

#include <iostream>

using namespace std;

int main()

{

   int a= 2345;              //initialization

   int l1=a%10;                //last digit

   int l2=(a/10)%10;        //second last digit

   cout<<"The number is "<<a<<" and sum of last two digit is "<<l1+l2;

   return 0;

}

Explanation:

It's written in c++ programming langauge

Hope it helps :-)

Similar questions