0
36.2 Practice Introduction To Function
Complete the function in order to print the sentence "Keep learning!" and call it from main() function. Output Keep learning! *Remember that the function declaration must be placed before the caller code. My Code: #include <iostream> using namespace std; void printSentence(); int main() { //function call printSentence(); return 0; } void printSentence() { //complete the function cout << "Keep Learning!"; } The output is correct but it says no input. Please help.
4 Réponses
+ 2
#include <iostream>
using namespace std;
void printSentence() {
//complete the function
cout<<"Keep learning!"<<endl;
} int main() {
//function call
printSentence();
return 0;
}
Good Luck
+ 1
// Make first letter small .. try this
cout << "Keep learning!";
+ 1
Wow… thanks SoloProg !!!
0
K should be capital in keep learning