67 108
Assignments Done
99,3%
Successfully Done
In November 2018

Answer to Question #1172 in C++ for sam

Question #1172
Write a C++ program to calculate and display the factors of the series that looks like this (1 , 2 , 4 , 8 , 16 , 32 , ........) up to the nth factor ?
Expert's answer
#include <iostream>#include <cmath>
using namespace std;
int main() {
cout<<"Enter n: ";
int n;
cin>>n;
for(int i=0;i<=n;++i){
cout<<pow(2, i)<<" ";
 } return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions