题干解读;要求输出其输入的数据a的个位数
思路:求a对于10的余数即为其个位数的值。
#include <iostream> using namespace std; int main() { int a; cin>>a; cout<<a%10; }