Fill This Form To Receive Instant Help
Homework answers / question archive / What is the output of the following program? Show the changes in memory #include <iostream> using namespace std; int main() { int a = 3, b = 3, p = 1, r = 1, i=1; cout<<a-<<" "<<++b<<endl; while(i <= b) { r = 0; r+=a; p*=r; cout<<a<<"and ''<<b<<" and "<<p<<endl; return 0; }
What is the output of the following program? Show the changes in memory
#include <iostream>
using namespace std;
int main()
{
int a = 3, b = 3, p = 1, r = 1, i=1;
cout<<a-<<" "<<++b<<endl;
while(i <= b)
{
r = 0;
r+=a;
p*=r;
cout<<a<<"and ''<<b<<" and "<<p<<endl;
return 0;
}