Find Selling Price from given Profit Percentage and Cost | C # implementation of above approach ; calculate Nth term of series ; Decimal Equivalent of Profit Percentage ; Find the Selling Price ; return the calculated Selling Price ; Driver Code ; Get the CP Profit % ; Printing the returned value
using System ; class GFG { static float SellingPrice ( float CP , float PP ) { float P_decimal = 1 + ( PP / 100 ) ; float res = P_decimal * CP ; return res ; } public static void Main ( ) { float C = 720 , P = 13 ; Console . Write ( SellingPrice ( C , P ) ) ; } }