C++ : read number of male and female students and find female to male ratio


#include<iostream>
#include<conio.h>

using namespace std;
int main()
{
float m,f;
cout<<"Enter the number of male : ";cin>>m;
cout<<"Enter the number of femaile : ";cin>>f;
  cout<<"\nFemaile to male ratio is "<<f/m<<" : "<<1;
getch();
return(0);
}

No comments:

Post a Comment