Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
random
#include<bits/stdc++.h> using namespace std; int processArray(vector<int>&arr) { int n=arr.size(); for(int i=0;i<n;i++) { if(arr[i]%4=0 && arr[i]>47) { arr[i]=-7; } else if(arr[i]%4==0) { arr[i]=-6; } else if(arr[i]>47) { arr[i]=-3; } } return 0; } int main() { vector<int>arr; while(1) { int num; cin>>num; if(num<0) break; arr.push_back(num); } processArray(arr); for(int i=0;i<arr.size();i++) cout<<arr[i]<<endl; }
run
|
edit
|
history
|
help
0
Median of row wise sorted matrix
2
Wipro Problem 2: determine count
Virtuals
Template arguments pack
factor
MCM
Matrix spiral print
Rotate90
Discounting