Skip to content

Convert Rupees To Paise

Updated: at 02:09 AM

Table of contents

Open Table of contents

Write a program to convert rupees to paise

Input  ( Rs ) : 1
Output ( Ps ) : 100

C

// Write a C program to convert rupees to paise

#include <stdio.h>

int main() {
    double rupees, paise;
    printf("Enter price in rupees: ");
    scanf("%lf", &rupees);

    paise = rupees * 100;

    printf("%.2lf rupees = %.2lf paise", rupees,paise);

    return 0;
}

C#

// Write a C# program to convert rupees to paise

using System;

class MainClass {
  public static void Main (string[] args) {
    Console.WriteLine("Enter price in rupees:");
    int rupees = Convert.ToInt32(Console.ReadLine());
    int paise = rupees * 100;
    Console.WriteLine(rupees + " rupees = " + paise + " paise");
  }
}

C++

// Write a C++ program to convert rupees to paise

#include <iostream>
using namespace std;

int main() {
  double rupees, paise;
  cout << "Enter price in rupees: ";

  cin >> rupees;

  paise = rupees * 100;

  cout << rupees << " rupees = " << paise << " paise";

  return 0;
}

Dart

// Write a Dart program to convert rupees to paise

void main(){
  double rupees = 10;
  double paise = rupees * 100;
  print('$rupees rupees = $paise paise');
}

F#

// Write a F# program to convert rupees to paise

let rupeesToPaise rupees : int =
   rupees * 100

let paise = rupeesToPaise 1

printfn "Equivalent Paise : %d" paise

Go

// Write a Go program to convert rupees to paise

package main

import "fmt"

func main() {
	var rupee float64
	var paise int
	fmt.Scanf("%f", &rupee)
	paise = int(rupee * 100)
	fmt.Println(paise)
}

Haskell

-- Write a Haskell program to convert rupees to paise

main :: IO ()
main = do
   putStrLn "Enter rupees: "
   input1 <- getLine
   let rupees = read input1 :: Float

   let paise = rupees * 100
   putStrLn $ show (paise)

Java

// Write a Java program to convert rupees to paise

import java.util.Scanner;
class Convert {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.print("Enter price in rupees: ");
        double rupees = in.nextDouble();
        in.close();
        double paise = rupees * 100;
        System.out.println(rupees + " rupees = " + paise + " paise");
    }
}

JavaScript

// Write a JavaScript program to convert rupees to paise

function rupeesToPaise(rupees) {
  let paise = rupees * 100;

  return paise;
}

console.log(rupeesToPaise(10));

Julia

# Write a Julia program to convert rupees to paise

print("Enter the rupees: ")
rupees = parse(Float64, readline(stdin))
paise = rupees * 100
println("Equivalent Paise: ", paise)

Kotlin

// Write a Kotlin program to convert rupees to paise

fun main() {
   val rupees = 10
   val paise = rupees * 100
   println("$rupees rupees = $paise paise")
}

Perl

# Write a Perl program to convert rupees to paise

#!/usr/local/bin/perl
$rupees = 10;
$paise = $rupees * 100;
print $rupees . ' rupees = ' . $paise . " paise";

PHP

// Write a PHP program to convert rupees to paise

<?php
$rupees = 10;
$paise = $rupees * 100;
echo $rupees . " rupees = " . $paise . " paise";
?>

Python

# Write a Python program to convert rupees to paise

def Convert(rupees):
    paise = rupees * 100
    print("{} rupees = {} paise".format(rupees, paise))


Convert(10)

R

# Write a R program to convert rupees to paise

rupees = 1
paise = rupees * 100
cat("paise: ", paise)

Ruby

# Write a Ruby program to convert rupees to paise

def rupeesToPaise(rupees)
  rupees * 100
end

if $PROGRAM_NAME == __FILE__
  print 'Please enter the rupees : '
  rupees = gets.chomp.to_i

  puts "#{rupees} rupee is #{rupeesToPaise(rupees)} paisa"
end

Rust

// Write a Rust program to convert rupees to paise

fn main(){
    let rupee: f32 = 1.00;
    let paise = rupee*100.00;
    println!("Given rupees are: {paise} p");
}

Scala

// Write a Scala program to convert rupees to paise

import scala.io.StdIn._;

object minutesToDays {
  def main(args:Array[String]):Unit={
    var rupees = readLine();
    println("Enter the rupees : "+rupees);
    var paisa = rupees.toInt * 100;
    println(rupees+" rupees are "+paisa+" paisa");
  }
}

Swift

// Write a Swift program to convert rupees to paise

import Swift
import Foundation

print("Enter rupees: ")
var rupees = Double(readLine()!)!
print("Paise: ", rupees * 100)

TypeScript

// Write a TypeScript program to convert rupees to paise

function rupeesToPaise(rupees: number): number {
  const paise: number = rupees * 100;

  return paise;
}

console.log(rupeesToPaise(100));

Similar programs