Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- if(n%4==0)
- {
- cout<<n<<endl;
- return 0;
- }
- else
- {
- int temp=n,sum=0;
- while (n)
- {
- int k = n % 10;
- sum += k;
- n /= 10;
- }
- if(temp%4==0)
- {
- cout<<temp<<endl;
- return 0;
- }
- temp=n+1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement