For Loop - Urdu
- subtitles off
- captions off
- English
- Questions posted on Forums
- Java Tutorials - Urdu
-
Assignment program
I am not able to make a program that can show all the Armstrong number between 100 to 1000.This is where I got so far;public class ForLoop { public static void main(String[] args) { int i; int j; int a=1; int b=1; int c=1; int r; r = a*100+b*10+c; c= c*c*c; a= a*a*a; b= b*b*b; j=a+b+c; for (i=100;i<1000;i=i+1) { if ((i==j)&(i==r)){ System.out.println(i+"is a Armstrong number"); } } }} above code give the answer but need to put every digit myself to do that.
05-06M 20-30S Naveen_158
Answer last updated on: Dec. 6, 2021, 9:13 p.m.
-
1Getting started java Installation
-
2First Java Program
-
3Installing Eclipse
-
4Getting started Eclipse
-
5Hello World Program in Eclipse
-
6Errors and Debugging in Eclipse
-
7Programming features Eclipse
-
8Numerical Datatypes
-
9Arithmetic Operations
-
10Strings
-
11Primitive type conversions
-
12Relational Operations
-
13Logical Operations
-
14if else
-
15Nested if
-
16Switch Case
-
17while loop
-
For Loop
-
19do while
-
20Introduction to Array
-
21Array Operations
-
22Creating class
-
23Creating object
-
24Instance fields
-
25Methods
-
26Default constructor
-
27Parameterized constructors
-
28Using this keyword
-
29Non static block
-
30Constructor overloading
-
31Method overloading
-
32User Input
Questions posted on ST Forums:
579 visits
Outline:
ٹیوٹورئل for loop کا تعارُف for loop سِنٹیکس for loop loop variable loop condition میں انکریمینٹ یا ڈِکریمینٹ loop variable بلاک loop کی روانی loop استعمال کرنے کے فوائد loop
Width: | 800 | Height: | 608 |
---|---|---|---|
Duration: | 00:06:35 | Size: | 3.6 MB |
Show video info