Advertisement
icatalin

Exercitiu 2 tema, rang k

Nov 26th, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int m,k,div,cif,cif2;
  8. cout<<"m="<<endl;
  9. cin>>m;
  10. cout<<"k="<<endl;
  11. cin>>k;
  12. div=k;
  13. cif=m/(pow(10,div));
  14. cif2=cif%10;
  15. cout<<"Cifra este..."<<endl<<cif2;
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement