I am uploading only those which i think i can forget in future
1-this one just finds the table of any number you enter
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
class Table{
public static void main(String arg[]){
int a,b,c;
b=Integer.parseInt(arg[0]);
for(a=0;a<=10;a++){
c=a*b;
System.out.println("result"+c);
}
}
}
1-this one just finds the table of any number you enter
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
class Table{
public static void main(String arg[]){
int a,b,c;
b=Integer.parseInt(arg[0]);
for(a=0;a<=10;a++){
c=a*b;
System.out.println("result"+c);
}
}
}
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
2-this one finds the sum of n numbers
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
class Ssum{
public static void main(String arg[])
{
int i,n,s=0;
n=Integer.parseInt(arg[0]);
for(i=0;i<=n;i++){
s=s+i;
}
System.out.println("sum ="+s);
}
}
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
3-this one took toooooooo long i kept messing with the logic
but finally i did it
so it helps find the result of power
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
class Power{
public static void main (String args[]){
int a,b,c,d=1;
a=Integer.parseInt(args[0]);
b=Integer.parseInt(args[1]);
for(c=0;c<=b;c++){
d=d*a;
}
System.out.println("result="+d);
}
}
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
4-this one finds the factorial of num god i ve done this prog many times but i still keep forgetting when i start with it
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
class Factorial{
public static void main(String arg[])
{
int a,b,c;
b=Integer.parseInt(arg[0]);
for(a=b;a<=b;--b)
{
System.out.println("here u go"+b);
}
}
}
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
5-this one prints the sum of n numbers
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
class Dum{
public static void main(String arg[])
{
int i,n,s=0;
n=Integer.parseInt(arg[0]);
for(i=0;i<=n;i++){
s=s+i;
}
System.out.println("sum ="+s);
}
}
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
No comments:
Post a Comment