Answer to Question #57658 in C++ for Kalyan
2016-02-08T07:34:47-05:00
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);
}
1
2016-02-12T00:01:01-0500
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 !
Learn more about our help with Assignments:
C++
Comments
Leave a comment