60 371
Assignments Done
98,1%
Successfully Done
In April 2018

Answer to Question #57658 in C++ for Kalyan

Question #57658
Write the output of the following c++ code:
#include<iostream.h>
Void print()
{
For(int ft=1;ft<=40;ft++)cout<<"+";
Cout<<endln;
}
Void print(int A,int B)
{
For(int ft=1;ft<=B;ft++)cout<<A*K;
Cout<<endln;
}
Void print(char T,int N)
{
For(int ft=1;ft<=N;ft++)cout<<T;
Cout<<endln;
}
voidmain()
{
int s=9,t=4,w=3;
char c="$";
print(c,t);
Print(s,w);
}
Expert's answer
Corrected code with output:

#include<iostream>
using namespace std;
void print()
{
for(int ft=1;ft<=40;ft++) cout<<"+";
cout<<endl;
}
void print (int A,int B)
{
for ( int ft=1;ft<=B;ft++) cout<<A*B;//WHAT is K maybe B?
cout<<endl;
}
void print (char T,int N)
{
for (int ft=1;ft<=N;ft++) cout<<T;
cout<<endl;
}
void main()
{
int s=9,t=4,w=3;
char c='$';
print(c,t);
print(s,w);
}

Output:

$$$$
272727

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