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 ?
1
Expert's answer
2010-12-20T16:39:58-0500
#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; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment