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.

6th Dec 2021, 10:57 PM
Chin Eu
Chin Eu - avatar
4 Answers
+ 2
#include <iostream> using namespace std; void printSentence() { //complete the function cout<<"Keep learning!"<<endl; } int main() { //function call printSentence(); return 0; } Good Luck
25th Jan 2022, 5:42 PM
Muhammad Alif Deva Rizqon
Muhammad Alif Deva Rizqon - avatar
+ 1
// Make first letter small .. try this cout << "Keep learning!";
7th Dec 2021, 12:13 AM
SoloProg
SoloProg - avatar
+ 1
Wow
 thanks SoloProg !!!
7th Dec 2021, 6:45 AM
Chin Eu
Chin Eu - avatar
0
K should be capital in keep learning
23rd Nov 2022, 2:38 PM
Isha Sinha
Isha Sinha - avatar