Question from the C# - Fundamentals test

Write a C# program to calculate the total price of 4 products with a 20% VAT.

Hard

What does the following code return:

static void Main(string[] args)  { 		  	  	 		 	 	
            double ht=15.0; 		  	  	 		 	 	 	  
            double tva=20.0; 		  	  	 		 	 	 	  
            int nb_articles=4; 		  	  	 		 	 	 	  
            double total = ht + ht*(tva/100);
            double totalnb=total*nb_articles;  
            Console.WriteLine("Le prix TTC d'un produit est = "+total); 		  	  	 	
            Console.WriteLine("Le prix TTC des "+nb_articles+" produits = "+totalnb);   	 	
}
Author: MaximeStatus: Published(Update)Question passed 55 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!