Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Suma fraccions

#include <iostream>
#include <math.h>

using namespace std;

int main()
{
   cout << "\tSuma de fraccions" << endl; 
   
   double valor1 = 3;
   double valor2 = 5;
   double valor3 = 7;
   double valor4 = 3;
   double fraccio1 = valor1/valor2;
   double fraccio2 = valor3/valor4;
   double resultat = fraccio1 + fraccio2;
   
   cout << "Fracció 1 = " << valor1 << "/" << valor2 <<endl;
   cout << "Fracció 2 = " << valor3 << "/" << valor4 <<endl;
   cout << "resultat suma de les fraccions = " << resultat << endl;
   
   return 0;
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.