What should I add to print 8 times "Today is a beautiful day " | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

What should I add to print 8 times "Today is a beautiful day "

#include <stdio.h> int main() { printf("Today is a beautiful day.\n"); int main(); return 0; }

12th May 2020, 12:44 PM
Dostonbek
Dostonbek - avatar
10 Réponses
+ 2
Is this C++ or C?
12th May 2020, 1:08 PM
James Clark I. Vinarao
James Clark I. Vinarao - avatar
+ 4
For C++ #include <iostream> using namespace std; int main() { int num = 1; while (num <= 8) { cout << "Today is a beautiful day" << endl; num = num + 1; } return 0; }
14th May 2020, 5:14 AM
Chandravanshi Aryan Ranjan Singh
Chandravanshi Aryan Ranjan Singh - avatar
+ 2
https://code.sololearn.com/cM02YiSgNsSq/?ref=app Hi Dostonbek just see this, you can understand better .
14th May 2020, 11:11 AM
Nikhil Maroju
Nikhil Maroju - avatar
+ 1
C++
12th May 2020, 1:10 PM
Dostonbek
Dostonbek - avatar
+ 1
If its C++, here is how: #include <iostream> using namespace std; int main() { int num = 1; while (num <= 8) { cout << "Today is a beautiful day" << endl; num = num + 1; } return 0; }
12th May 2020, 1:11 PM
James Clark I. Vinarao
James Clark I. Vinarao - avatar
+ 1
I just thought it was C++, but well then you're welcome.
12th May 2020, 1:21 PM
James Clark I. Vinarao
James Clark I. Vinarao - avatar
+ 1
Thank you
12th May 2020, 1:40 PM
Dostonbek
Dostonbek - avatar
0
tilni ozbekcha qisa bo‘ladimi
12th May 2020, 7:34 PM
dilshod
0
Tuwunmadm , tilini nma ahamiyati bor 🤔
12th May 2020, 7:36 PM
Dostonbek
Dostonbek - avatar
0
If c++ then #include<iostream> Void main(){ for(int i=0;i<8;I++){ Std::cout<<"Today is A wonderful Day\n"; } }
13th May 2020, 7:01 PM
Saif Ali
Saif Ali - avatar