title: How can I get value from multiple argument in one function and print it in main function in c?
body: <p>currently i study in c programming language but i have a problem, is there i can get one value from multiple argument in one function and print it in main function in c?? i already create a function that come out with two argument, but somehow i need to print just one argument that only appear one process that i create more than one operation in main function.</p>
  <p>this is my code:</p>
  <pre><code>#include&lt;stdio.h&gt;
  float bakeryShop(float price_a, float price_b)
  {
      float  discountA, discountB;
      discountA = price_a - (price_a*45/100);
      discountB = price_b - (price_b*60/100);
      
      printf(&quot;%.2f&quot;, discountA);
      return (discountA);
      
      printf(&quot;%.2f&quot;, discountB);
      return (discountB);
      
          
  }
  main()
  {
  char name_item_a[200];
      char name_item_b[200];
      float price_a, price_b;
      float discountA, discountB, result;
      
      
      printf(&quot;Enter item A: &quot;);
      scanf(&quot;%s&quot;, &amp;name_item_a);
      printf(&quot;Enter price for item A: &quot;);
      scanf(&quot;%f&quot;, &amp;price_a);
      
      
      printf(&quot;Enter item B: &quot;);
      scanf(&quot;%s&quot;, &amp;name_item_b);
      printf(&quot;Enter price for item B: &quot;);
      scanf(&quot;%f&quot;, &amp;price_b);
      
      printf(&quot;%s\n&quot;, name_item_a);
      bakeryShop(price_a, price_b);
      printf(&quot;%.2f&quot;, result); 
      return price_a;
      
      
      printf(&quot;%s\n&quot;, name_item_b);
      result = bakeryShop(price_a, price_b);
      printf(&quot;%.2f&quot;, result);  
      return price_b;
      
      
      
  }
  </code></pre>
  <p>if you can see in the bakeryShop function, i create two process which is discountA and discountB
  but how to display only discount A in main function ??</p>
  <p>because the output should be like this,</p>
  <pre><code>ITEM A 
  Name: 
  Original Price: RM 
  Price after 45% discount: RM 
  
  ITEM B 
  Name: 
  Original Price: 
  M Price after 60% 
  discount: RM
  </code></pre>
  <p>but i do not know how to get only one process discount A seperate with another process discount B</p>