Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
wellformed number
//clang 3.8.0 #include <iostream> class abc {private: int x; public: void input(); void check(); }; void abc::input() { std::cout<<"enter the number "; std::cin>>x; } void abc::check() {int h,t,f,d; f=0; t=x; h=t%10; t=t/10; while(t>0) {d=t%10; if(d>=h) {f=1; break; } h=d; t=t/10; } if(f==0) std::cout<<"wellformed number"; else std::cout<<"not a wellformed number"; } int main() {abc object; object.input(); object.check(); }
run
|
edit
|
history
|
help
0
Fun with Pointers #1
bubble sort
range based for loop temporary object lifetime issue example
ternary test
MPL 2-1
11/29
Exploring stringstreams
What's the problem with this?
cv5_class
list iota cout