Another way of solving the first problem - //This for loop is for each line for (int i = 0; i < 4; i++) { //This for loop is to print some number of stars in one line for (int j = i; j for (int i = 0; i < 4; i++) { for (int j = 0; j
Hey bro !! Ye har line me me ek star kam kaise ho raha hai. Decrease karne ke liye to decrement loop istemal hota hai na to phir increment loop se kaise ho raha hai?
6:17 sum of the even numbers using while loop: public class Main { public static void main (String[]args) { int sum = 0; int n = 4; int i = 0; while (i < n) { sum = sum + (2 * i); i++; } System.out.println ("the sum of the first 4 even numbers using while loop is below"); System.out.print (sum); } }
This playlist is useful even after 6-7 years, thanks for all your efforts , no words to describe your efforts, you are the hero for the new programmers 🙏🙏🙏🙏🙏😎😎😎
Before u solve these problems,,,I solved it confidently,,,because, I learnt c and c++ from your Playlist and now java as well with u ,,,, your amazing teacher..... thanks a ton ..🎉❤..
Hi Harry, First of all Thank you so much for a systematic tutorials. and Thanks Ayush, who recommend me to study from your tutorial. You know I am a mechanical engineer(passed in 2014) and now I have decided to learn java after waste of my 6 years. and really it is shocking, I have understand all concept because of your tutorial. You are really a great teacher. I have some basic idea about that but now I have cleared my all doubts. Thank you so much!!!
Bohot maza aaya Harry bhai practice set me... Question no 1 Star problem ko solve krte waqt to mujhe to sach me taare dikhne lage the😂😂... Phir 1 din baad aaj aapki ye video dekh kr usko banana seekh gya... Thank you so much, brother! May Allah bless you!
factorial in for loop -- Scanner sc = new Scanner(System.in); int factorial=1; System.out.println("Enter any number to get it's factorial"); int a = sc.nextInt(); for (int i=1 ; i
13:21 and 24:54 Maja aa raha hai Practice Set solve karne me bhi aur Videos dekhne me bhi, seriously you are providing us great quality course, which I don't think so many colleges provide ❤☺.
Question 2 using while loop public static void main(String[] args) { System.out.println("Code to find the sum of first n even numbers"); Scanner sc=new Scanner(System.in); System.out.println("Enter the value of n"); int n = sc.nextInt(); int i = 1; while(i
I know ki mai bhot late Dekh rahi hu ye cource but seriously I can see your efforts in it man sab kuch bhot useful hai aur ye practice set wala idea tho by God best hai hum new new thinks sikhate hai is waja se I am just loving it ❤ Thank for this harry bhai 🙏😇
For those who are learning Java,some good questions: [WAP means Write a program] 1.)WAP to print the reverse of a number 2.)WAP to print the factorial of first 5 natural numbers 3.)WAP to check whether a number is prime or not.If it is prime,print it's factorial else print it's multiplication table 4.)WAP to print the factorial of prime numbers from 1 to 10. 5.)WAP to check whether a number is special number or not. 6.)WAP to check whether a number is palindrome number or not. 7.)WAP to check whether a number is armstrong number or not. 8.)WAP to print the reverse of first 3 special numbers [U may Google the definition of palindrome,armstrong and special number.] Edit:If u found it useful for beginners,do like the comment so that everyone can go through these questions.
For solutions refer this : 1) import java.util.*; public class reverse { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("Enter a number"); int n=sc.nextInt(); int rev=0; while(n>0) { int d=n%10; rev=(rev*10)+d; n/=10; } System.out.println("The reverse of the number is "+rev); } } 2)public class factorialoffirst5numbers { public static void main(String[] args) { int fact=1; for(int i=1;i=1;j--) { fact=fact*j; } System.out.println("The factotial of "+i+" is "+fact); fact=1; } }
} 3) import java.util.*; public class primeornot { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("Enter a number"); int n=sc.nextInt(); int c=0; for(int i=1;i
@Altamas285 my brain literally travelled all universes while solving your questions 😂 as a beginner ? but tqsm it helped me in my thinking and logic building
9:10 The question was to print the sum of even numbers using while loop but Harry sir used for loop, did I miss a point, or did sir went somewhere wrong? 😅😅 By the way, thank you for the questions 😊
exactly same doubt bhai. Harry mentioned 3 types of loops can do same work in the question, but in which do while loop is executes at least once even if condition fails, whereas for and while loop do not work like that. In my opinion answer is false, but in the video harry talked about only for and while loops only, in that case he is right.
Harry bhai thank you so much for all your hard work. I might not being knowing how much hard work it takes for you to make these videos. @2:37 practice questions 1 and 2 were something I was not able to follow along. For question number 2 to be very honest with you nested for loop statement was used and I felt very hard to follow along. It would be great if you can suggest me any of your previous videos as a prerequisite to understand the nested loop statement. I am following your video series from the beginning please help me out. Thanks
9:10 while loop use karna tha, aapne for loop use kiya hai. import java.util.Scanner; class Sum_of_n_even_numbers { public static void main(String[] args) { int x, i = 0 ; int sum = 0; System.out.println("Enter Number of items :"); Scanner s = new Scanner(System.in); x = s.nextInt(); while(i < x) { sum = sum +(2*i); i++; } System.out.println("Sum of "+x+" numbers is :"+sum); } } This is how you do it with while loop.
15:16, Q - 5 // first and best way Scanner input = new Scanner(System.in); System.out.println("enter a num :"); int n = input.nextInt(); int res = 1; for (int i = 1; i
15:24 // Yeh raha code import java.util.Scanner; System.out.println("Enter the number whose factorial you want:"); Scanner sc = new Scanner(System.in); int fac = 1; int n = sc.nextInt(); for (int i = n;i>=1;i--){ fac = (fac*i); } System.out.printf("Factorial of %d = %d",n,fac);
---- Answers --- Question 7: 1 in while loop: int i=4; while(i>=0){ int j=i; while(j>0){ System.out.print("* "); j--; } System.out.println(); i--; } question 10: question 2 in while loop: Scanner scan=new Scanner(System.in); System.out.println("Enter the maximum limit of numbers: "); int n=scan.nextInt(); int i=0; while(i
yes definitely explain karunga!@@thesarthakshrestha For the 7th question as you can see that in the 1st question humne for loop use kiya hai aur usme don variable dale hai 'i' and 'j'. humne do variable dale hai kyonki humko vertically and horizontally jaana hai triangle banane ke liye. And the triangle is in the downwards direction so we will have to start 'j' equal to 'i'. as when 'i' will be 4, 'j' will be equal to 4 in the first loop and will print a 4 * line in the first line. Then using 'i--', Maine 'i' ko reduce kiya hai, kyon? kyonki phir 'j' 4-1 that is 3 times * print karega as 'j' is equal to 'i'. And similarly I have put the main loop to run till 'i' becomes 0. And For the 10th question, pehle toh maine user seh input liya hai for the maximum limit. phir maine i and sum ko declare kiya hai to 0. becuase if we multiply something to 0 we will get 0 and we want 0 as it is an even number as well. Then maine ek while loop run kiya hai that stops when i is more than the limit entered by the user. Aur us while loop mein, maine sum mein add karte gaya (i*2) kyon? kyonki any number multiplied by 2 becomes even for example 1 hoga 2, 2 hoga 4..... aur aise humko saare even numbers miljainge till that limit. And like that we will get the sum in 'sum'. Hope you understood :)
Instead of using format specifier in 3rd question we can do like this : package com; public class loop { public static void main(String[] args) { int n=6; for(int i=1;i
practice set Q-2 answer : int n = 5; int i = 0; int sum_ = 0; while (i < n){ sum_+=i*2; i++; } System.out.printf("sum of top 5 even number is %d",sum_);
Suvanjan Prasai If you will not specify the path,python will search the file in your current working directory and if the file is not found the python will throw you an error.
\\Question 5 using for loop Int Factorial=1; Scanner sc=new Scanner (System.in) ; System. Out. Print ("enter a number for factorial") Int n=sc.nextInt() ; for (int i=n;i>0;i--) { Factorial*=i; } System. Out. Print(Factorial) ;
Bro Harry ne nested loop ka use kiya hai , first loop jo hai woh row ki tarah kam karega aur uske andar wala second loop column ki tarah kaam karega . Agar aapko details me Jaan na hai toh apna college me shradha ma'am ne iss topic pe detail video daala hai
Hi SIr Code With Harry I am from pakistan. Trust me I watched your all videos from starting of java course.I will complete in another 10 days.Thanks for Guide us Correctly
Java practice set 5's all answers .(excluding 6 and 11) NOTE- Friends if you want to run the codes( given below ),then kindly run those separately for an error free experience. code- // q1 for(int b=4;b>0;b--){ for(int c=1;c
Thanks bro I cant solve the 7 no question , I am trying to solve this only while loop means one while loop under another while loop like for loop under for loop, so I see your answer and see you using for loop under while loop and I try it ,and it works ,Thanks❤
I tried Practice #1 seeing from questions before video. mine looked more simple. String str = "*"; for(int i=4; i>0; i--){ System.out.println(str.repeat(i)); }
Sir aap best ho...... Or practice question ki bahut jarurt thi..... Kyu sir definition to sab btate h... Par jab thak problem solve nhi ki tab tak samjh me nhi aata h.....
Bhai vo video ka jo intension tha vo satisfy nhi hua aur aage chal ke us video ne spam ka roop le liya jo ki achha nhi tha isiliye video private kar di bhai ne
ithana enjoy kar raha hoon is quesetions solve karke, ab yaha thyohaar chala raha hai phir bhi mai iss problems kosolve karke dekh raha hooon,kuch karne ka satisfaction aa raha hai mujhe
Enjoying solving the programs ........... really helpful for us cause it is really hard to learn loop online but by seeing this video it clears all our concept
Another way of solving the first problem -
//This for loop is for each line
for (int i = 0; i < 4; i++) {
//This for loop is to print some number of stars in one line
for (int j = i; j for (int i = 0; i < 4; i++) {
for (int j = 0; j
Your comment helped me a lot.
kudos to ur hardwork,it really helped alot
Hey bro !! Ye har line me me ek star kam kaise ho raha hai.
Decrease karne ke liye to decrement loop istemal hota hai na to phir increment loop se kaise ho raha hai?
@@JohnWick_897 jaisy jaisy outer loop kii value increase hw gii....waisy waisy inner loop k stars kam hn gy bcz j=i haii...
@@shahzaibbukharii6473 Thanks Bro! Samj me aagaya 👍
This is honestly the most fun I've had while studying, I love this course and the questions are amazing :D
go play some games they are more funny
@@neetusaxena7881 harry bhai ne ❤️ diya hai smjh nhi aata 🤔
These practice Programs are really useful for us
Jupiter Lab Tutorial
Binod
Binod
Binod
Binod
Entire Java course is going nice.
Thanks for providing these helpful courses at free of cost.
6:17 sum of the even numbers using while loop:
public class Main
{
public static void main (String[]args)
{
int sum = 0;
int n = 4;
int i = 0;
while (i < n)
{
sum = sum + (2 * i);
i++;
}
System.out.println
("the sum of the first 4 even numbers using while loop is below");
System.out.print (sum);
}
}
I'm feeling lucky because I don't even thought of learning programming in such a fun way, and practice sets are cherry on the top.
Ads - whitehat jr
But me -- THE LEGEND HARRY
yes man whitehat jr is a scam
Yes whitehatjr wale bhar k fees lete h jo sab mene yt p free m sikha
@@akshit288 chintu ne pgl bnaaya hai
This playlist is useful even after 6-7 years, thanks for all your efforts , no words to describe your efforts, you are the hero for the new programmers 🙏🙏🙏🙏🙏😎😎😎
Bro's from future💀
Harry bhai thanks for the amazing practice set. It gave me a lot of understanding about practical usage of for loops .Maza aa gaya problems dekh kar👌✌
Thanks for heart
@@manmohansingh1175 were u ex prime minister
@@ayushprajapati9251 No actually it is my grandfather 's name
@@ayushprajapati9251 😂😂
Modi ji(Mja nhi aarha he )
Question 11 using while loop first n even number sum is :
int sum = 0;
int i = 0;
int n = 5;
while (i
Bro love your way of explaining the concepts, growing myself by watching CWH videos and learning new languages
you love his way ? then follow his path and attain salvation
@@neetusaxena7881 wel believe in liberation not salvation
bro why are you crying in all comments @@neetusaxena7881
Before u solve these problems,,,I solved it confidently,,,because, I learnt c and c++ from your Playlist and now java as well with u ,,,, your amazing teacher..... thanks a ton ..🎉❤..
9:00 by using while loop
int i = 0;
int sum = 0;
int n = 3;
while (i
Harry bhai ko sikho ki while looop bolke for se kraray
Hi Harry,
First of all Thank you so much for a systematic tutorials.
and Thanks Ayush, who recommend me to study from your tutorial.
You know I am a mechanical engineer(passed in 2014) and now I have decided to learn java after waste of my 6 years. and really it is shocking, I have understand all concept because of your tutorial.
You are really a great teacher.
I have some basic idea about that but now I have cleared my all doubts.
Thank you so much!!!
Bekar ka comment read kiya ,merato time vest ho gya
😭😭😭
@@comedy6790 jb maine apki comment read ki...tab mera bhi apko same reply karane ka dil kiya .....apna aur time waist karake..................!
5:03 here we can also use,
public class Practise_Q17 {
public static void main(String[] args) {
String str= "*";
for( int i= 4;i
How did you get this logic building in detail bro.. merese to bina dekhe programing solve ho hi ni rhi yrr
@@taandavyt8826 yes bro ?any tips?
Sirf i!=0 likhne se hi ho jayega..i
@@taandavyt8826Ah! Same problem
Sir Harry I am learning and enjoy this course. You make this course very easy for us.
You are really great sir 🙏 . First time I'm not feeling bored by your lectures. Hope every teacher teaches us in this way !
Bohot maza aaya Harry bhai practice set me... Question no 1 Star problem ko solve krte waqt to mujhe to sach me taare dikhne lage the😂😂... Phir 1 din baad aaj aapki ye video dekh kr usko banana seekh gya... Thank you so much, brother! May Allah bless you!
Kids: Carry
Men: Marry
Legends: Harry 👌
superb said
Ohh
Who is marry ?
wtf
@@sahiljaggarwal4994 he is meaning merriage wala marry
00:20:09 -
problem - 7 -
/* Q. 7 - Solve Q.1 Using while loop */
int n = 4;
int i = 0;
while (i
Thanks🙌🏻
factorial in for loop --
Scanner sc = new Scanner(System.in);
int factorial=1;
System.out.println("Enter any number to get it's factorial");
int a = sc.nextInt();
for (int i=1 ; i
thank u so much sir for your time and efforts, I highly appreciate it
Qst:-7 write a program to print a following pattern using while loop---
Int n=4;
Int i=n;
While (i>0){
Int j=0;
While(j
wrong
@@ankurddank_afmishra1196 It is correct go check it first by Changing The initials LIke Int-int, While-while, J++ - j++
In the south statement I put /n then it will be done
Aapne 2nd question while loop se bola or for loop se kia.
Int i=0;
Int n=5;
Int sum=0;
While(i
13:21 and 24:54
Maja aa raha hai Practice Set solve karne me bhi aur Videos dekhne me bhi, seriously you are providing us great quality course, which I don't think so many colleges provide ❤☺.
Question 2 using while loop
public static void main(String[] args) {
System.out.println("Code to find the sum of first n even numbers");
Scanner sc=new Scanner(System.in);
System.out.println("Enter the value of n");
int n = sc.nextInt();
int i = 1;
while(i
9:00 Using While Loop
public static void main(String[] args) {
int sum = 0;
int n = 3;
int i = 0;
while(i
Hi bro mara ku first question ku solve nahi kor para hu help koro ga...
@@ittechnology8773
public class Pattern {
public static void main(String[] args) {
int i, j;
for (i = 1; i
It's wrong
Practice set se bahut madad milti hai bhaiya aur khud se solve krne ke baad aur maza aata hai ☺☺☺
harry bhai question may while loop use karne bola tha
8:34
int n =10;
int i=0 , sum=0;
while(i
I know ki mai bhot late Dekh rahi hu ye cource but seriously I can see your efforts in it man sab kuch bhot useful hai aur ye practice set wala idea tho by God best hai hum new new thinks sikhate hai is waja se I am just loving it ❤
Thank for this harry bhai 🙏😇
For those who are learning Java,some good questions:
[WAP means Write a program]
1.)WAP to print the reverse of a number
2.)WAP to print the factorial of first 5 natural numbers
3.)WAP to check whether a number is prime or not.If it is prime,print it's factorial else print it's multiplication table
4.)WAP to print the factorial of prime numbers from 1 to 10.
5.)WAP to check whether a number is special number or not.
6.)WAP to check whether a number is palindrome number or not.
7.)WAP to check whether a number is armstrong number or not.
8.)WAP to print the reverse of first 3 special numbers
[U may Google the definition of palindrome,armstrong and special number.]
Edit:If u found it useful for beginners,do like the comment so that everyone can go through these questions.
For solutions refer this :
1) import java.util.*;
public class reverse {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("Enter a number");
int n=sc.nextInt();
int rev=0;
while(n>0)
{
int d=n%10;
rev=(rev*10)+d;
n/=10;
}
System.out.println("The reverse of the number is "+rev);
}
}
2)public class factorialoffirst5numbers {
public static void main(String[] args) {
int fact=1;
for(int i=1;i=1;j--)
{
fact=fact*j;
}
System.out.println("The factotial of "+i+" is "+fact);
fact=1;
}
}
}
3) import java.util.*;
public class primeornot {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("Enter a number");
int n=sc.nextInt();
int c=0;
for(int i=1;i
@Altamas285 my brain literally travelled all universes while solving your questions 😂 as a beginner ? but tqsm it helped me in my thinking and logic building
Same here😂😂😂
Bro, how to solve the 8th question
Sir bhut mja aata h solve krne me.... Thank you so much sir 😊
Amazing Course and Truly Challenging and great questions. A wonderful learning experience
bhai aj ek chiz notice kari , ap itna badhia content de rahe hai vo bhi free
salute hai bhai aapke hard work ko
thank you very much bhai
9:10 The question was to print the sum of even numbers using while loop but Harry sir used for loop, did I miss a point, or did sir went somewhere wrong? 😅😅 By the way, thank you for the questions 😊
He later noticed his mistake so please ignore this comment😅😅😅
Arshad warsi be like :
Kahan se aate hai yeh log😂
Bhai abhi kya kar rhe ho? 🙂🙂Thoda gyan dedo bhiya😊😊
another way to solve first problem:-
public static void main(String[] args){
int n=10;
for (int i=0;i
20:30 But we can't use for or while loop for printing something at least once (even if it doesn't satisfy the condition) unlike do-while loop.
exactly same doubt bhai. Harry mentioned 3 types of loops can do same work in the question, but in which do while loop is executes at least once even if condition fails, whereas for and while loop do not work like that. In my opinion answer is false, but in the video harry talked about only for and while loops only, in that case he is right.
//Problem 2
int n=2;
int sum=0;
int i=0;
while(i
Harry bhai thank you so much for all your hard work. I might not being knowing how much hard work it takes for you to make these videos.
@2:37 practice questions 1 and 2 were something I was not able to follow along. For question number 2 to be very honest with you nested for loop statement was used and I felt very hard to follow along. It would be great if you can suggest me any of your previous videos as a prerequisite to understand the nested loop statement. I am following your video series from the beginning please help me out.
Thanks
idk why but same for me..other questions were easy to understand
Having a great time learning and solving all the problems
Maza a gaya bhia.. but I dint understood the first problem of stars🙄... Thank you love from Bangalore 💓
me bhi
Practice set is very useful, even now in 2023 all this is so relevant and actually paid in other Institutions.
thank you so much sir for these types of amazing practice set :)
problem number 2 using while loop
: int sum = 0;
int n=4;
int i=0;
while(i
This practice set is really awesome , no need to Google for this practice for this concept , KEEP IT UPP !❤️
Bhot accha lagta hai sir jb ap sikhate ho tb.... Hands off to you sir
Amazing explanation. Thanks for bringing this course. Helping a lot.
i am very impressed harry bro to your work
Harry bhai hacktoberfest ke baare me video banao na ..
Problem number 9
int n=8;
int sum=0;
int mul=0;
for(int i=1;i
Thank you so much man!!
Proud on you.
Your dedication level = no match
your videos are so damn amazing ... I'll become software engineer just by watching your videos 😅 that's how good your videos are ❤️
doing this java course continuously harry bro
good practice work
Legend of roasting - carry
Legend of coding - harry
yes ,
roaster:carry;
coder:harry;
TYSM bhaiya!!! best course ever !!!!
Ans 1:
String s = "****";
int a = s.length();
while (a>0){
System.out.println(s.substring(0,a));
a--;
}
Tnakns
thanks for the solution i was looking for that
9:10 while loop use karna tha, aapne for loop use kiya hai.
import java.util.Scanner;
class Sum_of_n_even_numbers
{
public static void main(String[] args)
{
int x, i = 0 ;
int sum = 0;
System.out.println("Enter Number of items :");
Scanner s = new Scanner(System.in);
x = s.nextInt();
while(i < x)
{
sum = sum +(2*i);
i++;
}
System.out.println("Sum of "+x+" numbers is :"+sum);
}
}
This is how you do it with while loop.
15:16,
Q - 5
// first and best way
Scanner input = new Scanner(System.in);
System.out.println("enter a num :");
int n = input.nextInt();
int res = 1;
for (int i = 1; i
Hello Sir, please could you tell me what is the cenario of System.out.printf();
Why we use and how we use...?
What is the benefits..?
@@vishaldeshmukh926 go back a few videos. i suggest not skipping the playlist. keep eyes and ears open when watching.
6:14 public class Main {
public static void main (String[] args) {
int sum = 0 ;
int n = 6 ;
int i = 1 ;
while(i
15:24
// Yeh raha code
import java.util.Scanner;
System.out.println("Enter the number whose factorial you want:");
Scanner sc = new Scanner(System.in);
int fac = 1;
int n = sc.nextInt();
for (int i = n;i>=1;i--){
fac = (fac*i);
}
System.out.printf("Factorial of %d = %d",n,fac);
mja aa rha h bhaiya bahout khud se solve kiya aur solve hua bhout khusi hui harry bhaiya
13:22
humen maza aa raha hai questions solve krne mein
Bahut mazaa aa rha hai Sir ji..... Aapka explain krne ka method bahut achcha h
---- Answers ---
Question 7: 1 in while loop:
int i=4;
while(i>=0){
int j=i;
while(j>0){
System.out.print("* ");
j--;
}
System.out.println();
i--;
}
question 10: question 2 in while loop:
Scanner scan=new Scanner(System.in);
System.out.println("Enter the maximum limit of numbers: ");
int n=scan.nextInt();
int i=0;
while(i
dono ko explain kar sakte ho ansh bhai plzz
yes definitely explain karunga!@@thesarthakshrestha
For the 7th question as you can see that in the 1st question humne for loop use kiya hai aur usme don variable dale hai 'i' and 'j'. humne do variable dale hai kyonki humko vertically and horizontally jaana hai triangle banane ke liye. And the triangle is in the downwards direction so we will have to start 'j' equal to 'i'. as when 'i' will be 4, 'j' will be equal to 4 in the first loop and will print a 4 * line in the first line. Then using 'i--', Maine 'i' ko reduce kiya hai, kyon? kyonki phir 'j' 4-1 that is 3 times * print karega as 'j' is equal to 'i'. And similarly I have put the main loop to run till 'i' becomes 0.
And For the 10th question, pehle toh maine user seh input liya hai for the maximum limit. phir maine i and sum ko declare kiya hai to 0. becuase if we multiply something to 0 we will get 0 and we want 0 as it is an even number as well. Then maine ek while loop run kiya hai that stops when i is more than the limit entered by the user. Aur us while loop mein, maine sum mein add karte gaya (i*2) kyon? kyonki any number multiplied by 2 becomes even for example 1 hoga 2, 2 hoga 4..... aur aise humko saare even numbers miljainge till that limit. And like that we will get the sum in 'sum'.
Hope you understood :)
7ans wrong hai
@@mirzayounus676 j++ hoga ❓
@@mirzayounus676 kaise wrong hai bro??
We are enjoying this course a lot. Thank you so much
Instead of using format specifier in 3rd question we can do like this :
package com;
public class loop {
public static void main(String[] args) {
int n=6;
for(int i=1;i
Thanks very helpful for me.
i also done it in the same way bro, stay blessed
//Question 11
//Repeat Question 2 using for loop
//Scanner sc=new Scanner(System.in);
//int n;
//System.out.println("Enter a number");
//n=sc.nextInt();
//int sum=0;
//for(int i=0;i
Que no2 to using while loop se kaise aayega?
Aapne for loop se solve kiya hai...
int n=0,even,sum=0;
while(n
practice set Q-2
answer :
int n = 5;
int i = 0;
int sum_ = 0;
while (i < n){
sum_+=i*2;
i++;
}
System.out.printf("sum of top 5 even number is %d",sum_);
I have a question regarding python. Can I open any file, folder, apps without adding a path?
If the file is not in your current working directory, then you have to specify the full path otherwise no need.
@@techysparks2890 but I want my python to search for it, not give the path
@@techysparks2890 environment variable is another thing
@@suvanjanprasai544 you can use rglob to search files
Suvanjan Prasai If you will not specify the path,python will search the file in your current working directory and if the file is not found the python will throw you an error.
your saying of See you next time.. the modulation of voice and appeal in it is really cool!
\\Question 5 using for loop
Int Factorial=1;
Scanner sc=new Scanner (System.in) ;
System. Out. Print ("enter a number for factorial")
Int n=sc.nextInt() ;
for (int i=n;i>0;i--) {
Factorial*=i;
}
System. Out. Print(Factorial) ;
bhai nahi challa
par yeh challa
meine banaya
Int factorial =1 hoga kya??
@@saurabhsingh-fn4ru hmm bhai. 1 hoga galti de limja diya hai agar 0 hoga jitne bar multiply karenge 0 hi rahega
Bhai loop me sach me maja aa gaya. Kya samjaya hai👌👌👌👌
20:36 No it's false..... Do while has minimum execution of 1 which is not the case with the other 2 loops
...
Harry bhai akhir kar answer aa hi gaya
Mujhe ye 1 samajh kyon nhi aa rha?
Kyaa nahi samaj araha
Refer others videos for * pattern program.. Harry's video on pattern program are too difficult .. he will not explain the core logic
Us bro us
Bro Harry ne nested loop ka use kiya hai , first loop jo hai woh row ki tarah kam karega aur uske andar wala second loop column ki tarah kaam karega . Agar aapko details me Jaan na hai toh apna college me shradha ma'am ne iss topic pe detail video daala hai
Bhai lpu se ho kya@@j-techcreationstudio7389
Hi SIr Code With Harry I am from pakistan. Trust me I watched your all videos from starting of java course.I will complete in another 10 days.Thanks for Guide us Correctly
Java practice set 5's all answers .(excluding 6 and 11)
NOTE- Friends if you want to run the codes( given below ),then kindly run those separately for an error free experience.
code-
// q1
for(int b=4;b>0;b--){
for(int c=1;c
Thanks bro I cant solve the 7 no question , I am trying to solve this only while loop means one while loop under another while loop like for loop under for loop, so I see your answer and see you using for loop under while loop and I try it ,and it works ,Thanks❤
can Q7 be solved using only while loops?
@@subhajitkhasnobish2370 int i = 4;
while(i>0){
int j = 0;
while(j
@@badalsahoo3902 int i = 4;
while(i>0){
int j = 0;
while(j
Thanks brother helped a lot for question number 2
Bohot maja aa raha ha Harry Bhaiya in problem ko solve karne me.
I tried Practice #1 seeing from questions before video. mine looked more simple.
String str = "*";
for(int i=4; i>0; i--){
System.out.println(str.repeat(i));
}
I am amazed by your answer, great work :)
@Rana Hanoon Thank you bro
Q1 while loop se kar dein...
Sir aap best ho...... Or practice question ki bahut jarurt thi..... Kyu sir definition to sab btate h... Par jab thak problem solve nhi ki tab tak samjh me nhi aata h.....
Hara Hara mahadeva
Har Har Mahadev
bhai aap bhot mhnt krto ho hmare lia thankyou so much harry bhai.....
bhaiya ji free tshirt wale video delete kyu kar de
le harry bhaiya:) pure to mere subscriber log he lekar chale gye mujhe nhi mila😂
private kr di
Bhai vo video ka jo intension tha vo satisfy nhi hua aur aage chal ke us video ne spam ka roop le liya jo ki achha nhi tha isiliye video private kar di bhai ne
@@technosujeet why?
spam kaise ho gye?
ithana enjoy kar raha hoon is quesetions solve karke, ab yaha thyohaar chala raha hai phir bhi mai iss problems kosolve karke dekh raha hooon,kuch karne ka satisfaction aa raha hai mujhe
6:01q
questions was print sum of n even number by using while loop but you used for loop !!!!!!!!!!!!!!!!!!!!!!
Give me a heart
Que-11
Scanner sc =new Scanner (System. in) ;
int n =sc. NextInt();
System. out. Println("sum of even number is : ")
int i =0;
int sum;=0;
While(i
Really enjoy and solve these practice problems thank You Harry sir.
Enjoying solving the programs ........... really helpful for us cause it is really hard to learn loop online but by seeing this video it clears all our concept
Bohot maza aa rha hai isse solve karne me 😊
Entire Java course is going nice.
sir aap bohat hi ache padate ho 😍😊
suru majburi me kiye the but ab maja aa raha he..... :)
I am enjoying solving these problems thanks Harry Bhai
you are great sir you are better than my university professor
These practices problem are really useful for us
bahut mazzaa aa raha hai harry bhai
sir bht maza aa rha hai. problem solving main
int n = 5;
int sum= 0;
int i = 0;
while (i