Close
Close

using fraction in c++

   chahat

can you please help me out with ,how to display fraction on screen as such for eg. i want to print 2/3 as such not their divide result?


Answers

  •   

    define the value as float not integer(use float x not int x) or else write it as  2.0/3.0 to get answer upto 4 decimal places



  •    Jewel Galore

    Jewelgalore features a stunning selection of stud earrings . Explore our collection to find elegantly designed pieces that add a touch of sophistication and charm to your style.



  •    OSH UNIVERSITY

    Pursue excellence at Osh University through dynamic graduate courses designed to propel you into the forefront of your field. Join a community of scholars, where innovation and knowledge converge to redefine what's possible in your academic and professional journey.



Ask Yours
Post Yours
Write your answer