Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream.h>
- #include<conio.h>
- int main()
- {int a,b,c,i,np,nn,ult,pn,k,ma;
- cin>>a,b;
- np=0;n=0;sum=0;ult=0;pn=1;k=0;ma=0;
- for(i=a;i<=b;i++)
- {
- if(i>0)
- {cout<<"pozitiv"<<i;
- np+=1;
- }
- if(i<0)
- {cout<<"negativ"<<i;
- nn+=1;
- }
- }
- cout<<np<<nn;
- for(i=a;i<=b;i++)
- {
- if(i%2==0
- {
- sum+=i;
- }
- }
- while(sum)
- {ult = sum%10;
- sum = sum /10;
- }
- cout<<ult;
- for(i=a;i<=b;i++)
- {
- if(i>=10 && i<=99)
- {
- if(i>=-99 && i<=-10)
- {pn=pn*i;
- k+=1;
- }
- }
- }
- ma=pow(pm,k);
- cout<<ma<<k;
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement