0
Where I am lacking
#include <iostream> using namespace std; int main() { int x; int y; int z=0; int a; cin>>x; {x%10=a; cout<<a;} {z=x-a;} {y=z/10; cout<<y;} return 0; }/*to print the ones and tens digit of a number entered by user can any tell where i am lacking*/
2 Answers
+ 5
Replace x%10=a with a=x%10. You can't assign an uninitialized variable to an expression.
0
thank