public class Divisible {
int num;
int sum;
public void calculate() {
sum=0;
System.out.println("Numbers divisible by 9:");
for(num=50;num<100;num++) {
if(num%9==0) {
System.out.println(num);
sum=sum+num;
}
}
System.out.println("Sum: "+sum);
}
public static void main(String a[]) {
Divisible obj=new Divisible();
obj.calculate();
}
}
for( int i = 54; i <= 100; i += 9 ) {
System.out.println(i);
}
}
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
#include
To print lucky numbers in java, you must give the following program: class example { static public void main(String[] args) { System.out.println("Lucky number is your favourite number which is your DOB"); } }
Reference:http:cprogramming-bd.com/c_page2.aspx# strange number
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
You can use int i; for (i = 10; i <= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.
#include
To print lucky numbers in java, you must give the following program: class example { static public void main(String[] args) { System.out.println("Lucky number is your favourite number which is your DOB"); } }
Oh, what a lovely request! In FoxPro, you can create a program to print all prime numbers from 1 to 100 by using a loop to check each number for divisibility only by 1 and itself. If it meets this criteria, you can print it out on the screen. Remember, every number is unique and special, just like a happy little tree in a vast forest.
Reference:http:cprogramming-bd.com/c_page2.aspx# strange number
question clarity
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
you do this 10 print "0112358132134" use the whole of the thing
write a program to print A to Z on screen in c?
Try the triangle program on a search engine. Replace numbers with stars and that should do the trick
Write a c program to print the 100 to 1 nos