Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream.h>
- #include<conio.h>
- #include <math.h>
- int main()
- {
- int a,b[100];
- clrscr();
- cout<<"input a number: ";
- cin>>a;
- for(int k=0;k<a;k++){
- cin>>b[k];
- }
- for(int i=0;i<a;i++){
- b[i]=pow(b[i],2);
- if(b[i]%2==0){
- cout<<b[i]<<" is divisible by 2";
- }
- else{
- cout<<b[i]<<" is not divisible by 2";
- }
- cout<<"\n";
- }
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement