You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// NOTE this file show you how one can replicate one code into my templaate
2
+
3
+
#include"h1.h"//manadatory don't remove it !!
4
+
5
+
intsumm(int n)
6
+
{
7
+
int sum = 0;
8
+
while (n != 0) {
9
+
sum = sum + n % 10;
10
+
n = n / 10;
11
+
}
12
+
return sum;
13
+
}
14
+
15
+
16
+
_s //manadatory don't remove it !!
17
+
18
+
int n1;
19
+
cin>>n1;
20
+
int s=summ(n1);
21
+
if(s%2==0)
22
+
{
23
+
if(summ(n1+1)%2==0)
24
+
cout<<n1+2 lc; //notice we have added lc which is defined as <<"\n" in ```h1.h``` we need to do because user has putted ```endl``` after callling solve function
25
+
else
26
+
cout<<n1+1 lc; //notice we have added lc which is defined as <<"\n" in ```h1.h``` we need to do because user has putted ```endl``` after callling solve function
27
+
}
28
+
else
29
+
{
30
+
if(summ(n1+1)%2==0)
31
+
cout<<n1+1 lc; //notice we have added lc which is defined as <<"\n" in ```h1.h``` we need to do because user has putted ```endl``` after callling solve function
32
+
else
33
+
cout<<n1+2 lc; //notice we have added lc which is defined as <<"\n" in ```h1.h``` we need to do because user has putted ```endl``` after callling solve function
34
+
}
35
+
36
+
_2 //manadatory don't remove it !!
37
+
38
+
//notice we have used _2 instead of _1 since we have one or more test cases to be tested
0 commit comments