+ 2
Whats wrong with the code cuz its not working for me
#include <iostream> using namespace std; int main() { cout << "C \n"; cout << "+ \n"; cout << "+"; return 0; } Please who can help me?
4 odpowiedzi
+ 5
Jamilu Abubakar Sadiq
There should not be space after each character.
+ 4
Can you provide us with the error it throws?
(It actually worked fine )
+ 1
This should output:
C
+
+
Is this not the format you want? If you want “C++”, remove the space after the C and the + and get rid of the next lines (\n)
+ 1
Please help me my friend
You are making a text encryptor. It should take multiple words and output a combined version, where each word is separated by a dollar sign $.
For example, for the words "hello", "how", "are", "you", the output should be "$hello$how$are$youquot;.
The given code declares a class named Add, with a constructor that takes one rest parameter.
Complete the code by adding a print() method to the class, which should generate the requested output.
class Add {
constructor(...words) {
this.words = words;
}
//your code goes here
}
print($ )
var x = new Add("hehe", "hoho", "haha", "hihi", "huhu");
var y = new Add("this", "is", "awesome");
var z = new Add("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit");
x.print();
y.print();
z.print();