Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main () {
- int a,b;
- long long s,c;
- cin>>a>>b;
- if(0<=a&&a<=b&&b<=10000){
- for(int i=a;i<=b;i++){
- s=pow(i,2);
- cout<<s<<" ";
- }
- cout<<endl;
- for (int j=b;j>=a;j--){
- c=pow(j,3);
- cout<<c<<" ";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement