Answers for "How do I find the number in the tens. Or hundredth place using C++ program?"

0

How do I find the number in the tens. Or hundredth place using C++ program?

// Main function of the C++ program.

#include <iostream>
using namespace std;

int main()
    {
        int x,op,tp;
        cout<<"Enter a number"<<endl;
        cin>>x;
        op=x%10;
        cout<<"the value in the once place is:"<<op<<endl;
        tp=x/10;
        cout<<"The value in the tens place is:"<<tp<<endl;
        return 0;
    }
Posted by: Guest on June-11-2021

Code answers related to "How do I find the number in the tens. Or hundredth place using C++ program?"

Browse Popular Code Answers by Language