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.
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"); } }
#include
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.
Here's a simple Python program that takes two numbers as input and prints each number alongside its square: # Input two numbers num1 = float(input("Enter the first number: ")) num2 = float(input("Enter the second number: ")) # Print each number and its square print(f"Number: {num1}, Square: {num1**2}") print(f"Number: {num2}, Square: {num2**2}") This program uses the input function to read numbers, converts them to floats, and then calculates and displays their squares.
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"); } }
#include
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?
Write a c program to print the 100 to 1 nos