Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  d
Language: PASCAL
Code:
procedure SOMMA_FRAZIONI (var P_num1, P_den1, P_num2, P_den2, num_fin, den_fin : integer);  
 var  
   new_num1, new_num2, : integer;  
 begin       
   RID_MIN_TERM(P_num1,P_den1);  
   RID_MIN_TERM(P_num2,P_den2);  
   mcm(P_den1,P_den2, den_fin);  
   new_num1:=(den_fin/P_den1)*P_num1; 
   new_num2:=(den_fin/P_den2)*P_num2; 
   num_fin:=new_num1+new_num2;   
 end.      
Comments: