Division of two numbers

 Division of two numbers


C Program
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int a,b,res;
   printf("Enter First Number:");
   scanf("%d",&a);
   printf("Enter Second Number:");
   scanf("%d",&b);
   res = a/b;
   printf("The divison of %d from %d is %d",a,b,res);
}


Java Program
import java.util.Scanner;

public class SimpleProgram{

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		System.out.print("Enter First Number:");
		int a = s.nextInt();
		System.out.print("Enter Second Number:");
		int b = s.nextInt();
		System.out.print("Division of " + a +" from " + b + " is " + (a/b));

	}

 }
 


Python Program
A = int (input("Enter a Number: "))
B = int (input("Enter a Number: "))
print("Division of " + str(A) + " from " + str(B) + " is " + str(A/B) )

0 Comments:

Post a Comment