For, While and do-while loops in C++ | C++ Tutorials for Beginners #10

preview_player
Показать описание

Best Hindi Videos For Learning Programming:

►C Language Complete Course In Hindi -

►JavaScript Complete Course In Hindi -

►Django Complete Course In Hindi -

Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

#include<iostream>
using namespace std;
int main(){
int a=6;
int i=1;
do{
cout<<a*i<<endl;
i++;
}while(i<=10);
return 0;
}

elsptrueelectrical
Автор

code for six table:
#include<iostream>
using namespace std;
int main(){
// 6 table
int i=6;
do{
cout<<i<<endl;
i = i+6;
} while(i<=60);
return 0;
}

a--vikas_boarde.
Автор

You are the best 💚💚.
I am a beginner and i did it in first try😊😊:

#include<iostream>
using namespace std;

int main(){

int num=6, multiplier=1;
do
{
cout<<num*multiplier<<endl;
multiplier++;
} while (multiplier<=10);



return 0;
}

umesh.
Автор

using namespace std;
int main(){
cout<<"Enter the no whose table you want"<<endl;
int m;
cin>>m;
int i=1;
while(i<=10){
cout<<i*m<<endl;
i++;
}
return 0
}

arandomyoutubewatcher
Автор

For any number, the program for multiplication table
include <iostream>
using namespace std;
int main()
{
int i;
int n;
cout<<"give the number"<<endl;
cin>>n;
for(i=1;i<11;i++)

return 0;
}

saikrishnareddy
Автор

Challenge accepted and Completed Successfully. Sir you are really great teacher, Before I started learning coding from you I used to find it boring but now I have started to enjoy it!!!!😊😊😊

pulastyabhagwat
Автор

Super fun to do that
# include<iostream>
Using namespace std;
Int main(){
//For Loop
Int n =6;
for( int i=1; i<=10;i++){
cout<<i*n<<endl;
}
return 0;
}


//While loop
Int i=1, n=6;
While(i<=10){
cout<<i*n<<endl;
i++;
}

//do while loop
Int i=1, n=6;
do
{
cout<<i*n<<endl;
i++;
}
While(i<=10);

spdevile
Автор

19:17 Challenge accepted.


#include <iostream>

using namespace std;

int main(){
int i=6;
do
{
cout<<i<<endl;
i=i+6;
} while (i<=60);

return 0;
}

SamarthChawlaSam
Автор

Challenge accepted 👍
#include<iostream>

using namespace std;

int main(){
//This will print the table of six;
int i = 6;
do{
cout<<i<<endl;
i=i+6;
}while(i<=60);

return 0;
}

yptechtips
Автор

Challenge Accepted
#include<iostream>
using namespace std;
int main()
{
int i=1;
do{
cout<<6*i<<endl;
i++;
}
while(i<=10);
return 0;
}
Thank you very much Harry Bhaiya...Please keep making such videos ...🥰🥰🥰

parthdeshpande
Автор

#include<iostream>
using namespace std;

int main() {
int i=6;
while(i<=60)
{
cout<<i<<endl;
i=i+6;
}
return 0;
}

shivansharma
Автор

Table of SIX using do-while loop :

#include<iostream>
using namespace std;
int main (){
int i = 1;
do {
cout<<i*6<<endl;
i++;
}while(i<=10);
return 0;
}

adamali
Автор

using for loop.table of 6


#include<iostream>
using namespace std;
int main(){

for (int i = 1; i <=10; i++)
{
cout<<6*i<<endl;
}


return 0;
}

gSquare
Автор

Challenge accepted

#include<iostream>
using namespace std;
int main()
{
for(int i=1; i<=10; i++)
{
cout<<i*6<<endl;
}
return 0;

tusharpatil
Автор

#include <iostream>
using namespace std;
int main ()
{

//using while loop

/* int i=1, n=6;
while(i<=10){
cout<<"The table of 6 is"<<i*n<<endl;


i++;

}*/


//using for loop
/*int n=6;
for(int i=1;i<=10;i++){
cout<<"The multiplication of 6 is"<<i*n<<endl;

}*/
//Using do while loop

/* int i=1, n=6;
do{
cout<<"multiplication of 6 is"<<i*n<<endl;
i++;
}while(i<=10);*/

return 0;
}

Really enjoying your teaching sir it is helping me alot...Thank you so much

rishabhpandey
Автор

table of 6
#include<iostream>
using namespace std;

int main() {
int i = 6;
do
{
cout<<i<<endl;
i +=6;
} while (i<=60);
}

shreyanshsurana
Автор

Here is the code for any table using while loop:
#include<iostream>
using namespace std;
int main()
{
int a;
cout<<"Enter any number : ";
cin>>a;
int i=1;
while(i<=10){
cout<<a*i<<endl;
i++;
}
cout<<"Here is your table";
return 0;
}

viplovekaithwas
Автор

Challenge Accepted:-
The Code for the Given Challenge is:-
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;

int main()
{
int n;
cout<<"Enter the number you wnat the Table of: "<<endl;
cin>>n;
int i = 1;

do
{
// cout<<n<<" * "<<i<<" = "<<setw(4); Just was trying to use Setw Function Taught Previously
cout<<n<<" * "<<i<<" = ";
cout<<n*i<<endl;
i++;

} while (i<=9);
// Change change this to print the code till wherever you want the table to be

return 0;
}


//Harry Bhai you are Awesome🔥

nishankkose
Автор

challenged accepted sir int i=1;
do{
cout<<i*6<<endl ;
i++ ; } while(i<=10) you explained very well, i don't even know how to write the programme for sum of two integers but now i am able to write and undestand . thanks a lot

__ajaymath
Автор

#include<iostream>
using namespace std;
int main(){
int i=1, num;
cin>>num;
do{
cout<<i*num<<endl;
i++
}while(i<=10);
return 0;
}

Anasop