add a multiplication operation
Add a member-function which performs multiplication of two float point digits. Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
This commit is contained in:
		
							parent
							
								
									ef3331a870
								
							
						
					
					
						commit
						ad82668fad
					
				@ -9,3 +9,8 @@ int Calculator::Sub (double a, double b)
 | 
			
		||||
{
 | 
			
		||||
	return Add (a, -b);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int Calculator::Mul (double a, double b)
 | 
			
		||||
{
 | 
			
		||||
    return a * b + 0.5;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,8 @@ class Calculator
 | 
			
		||||
	public:
 | 
			
		||||
		int Add (double, double);
 | 
			
		||||
		int Sub (double, double);
 | 
			
		||||
		int Mul (double, double);
 | 
			
		||||
>>>>>>> e0ea21b (add a multiplication operation)
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif//CALCULATOR_H
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user