program for addition of fraction(M/N + P/Q = Y/Z)
Answer / sreejesh1987
#include<iostream.h>
#include<conio.h>
void main()
{
int m,n,p,q,y,z;
clrscr();
cout<<"\nEnter the numerator and denominator of fraction A: ";
cin>>m>>n;
cout<<"\nEnter the numerator and denominator of fraction B: ";
cin>>p>>q;
y=m*q+n*p;
z=n*q;
int d=(y<z)?y:z;
cout<<"\nSmaller of resultant's numbers: "<<d;
int i=2;
while(i<=d)
{
while((y%i)==0&&(z%i)==0)
{
y=y/i;
z=z/i;
}
i++;
}
cout<<"\nResulting fraction is: "<<y<<"/"<<z;
getch();
}
| Is This Answer Correct ? | 5 Yes | 1 No |
Event Handling in C# Triggering a Button
"c sharp" code for factorial using static variables
program to reverse the order of digits in a given number of any length.
Create a class called Accounts which has data members like ACCOUNT no, Customer name, Account type, Transaction type (d/w), amount, balance D->Deposit W->Withdrawal If transaction type is deposit call the credit(int amount) and update balance in this method. If transaction type is withdraw call debit(int amt) and update balance. Pass the other information like Account no,name,Account Type through constructor. Call the show data method to display the values.
c# coding for a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors not using the Big-integer and Exponential Function's.
write a Program to copy the string using switch case.
how to change password in .net with c # with ado.net and also SQL server 2008 change password
Write a program to input an integer and - display the reverse - display the sum of each digit - should include logic that considers the input number as any number of digits long
I am developing a web application using google map api.I want to update the map inside the div control within update panel. I got other controls updated but map doesn't get updated.I do not not want to update map whenever unnecessary controls are fired at server side.How could it be achieved?
IS Array list is generic or non generic
how to get the table names via c sharp and column names also?
program to reverse the order of words in a string.