Problem: 1866 - Bill
Solution:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int i, j, t, n, sum=0;
cin>>t;
while(t--)
{
cin>>n;
if(n%2==0)
cout<<"0"<<endl;
else
cout<<"1"<<endl;
n=0;
}
return 0;
}
Code · Faith · Curiosity
cpp �� 2023-08-16 12:20:44
Problem: 1866 - Bill
Solution:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int i, j, t, n, sum=0;
cin>>t;
while(t--)
{
cin>>n;
if(n%2==0)
cout<<"0"<<endl;
else
cout<<"1"<<endl;
n=0;
}
return 0;
}
Post Visited: 450 times
Categories: cpp
No comments yet. Be the first to comment!