To find the ratio of x and y, the formula is x/GCD(x,y) : y/GCD(x,y).
#include<stdio.h>
#include<conio.h>
int gcdrec(int ,int);
void main()
{
int x,y;
clrscr();
scanf("%d %d",&x,&y);
printf("Ratio = %d:%d",x/gcdrec(x,y),y/gcdrec(x,y));
getch();
}
int gcdrec(int a , int b)
{
return(b!=0 ? gcdrec(b,a%b) :a);
}
#include<stdio.h>
int main()
{
float a,b;
float c;
printf("Enter A and B values : ");
scanf("%f%f",&a,&b);
c=a/b;
printf("n The resultant value : %.2f",c);
return 0;
}
hi. u need to declare a and b valus as float other wise u get only Quotient. u will not get complete result (with decimal points)
Halstead proposed the first analytic laws for computer science by using a set of primitive measures. these can be derived once the design phase is complected and the code is generated. these measures are listed below * n1= number of distinct operators in a program * n2= number of distinct operands in a program * N1= total numbers of operators * N2= total number of operandsBy using these measures,Halstead developed an expression for overall program length,program volume,program difficulty,development effort and so on.Program length (N) can be calculated by using equation:N = n1log2 n1 + n2log2 n2Program volume (V) can be calculated by using equation:V = N log2(n1+n2)Note that the program volume depends on the programming language used and respesents the volume of information (in bits) required to specify a program.Volume ratio (L) can be calculated by using the following equation:---- volume of the actual programWhere value of L must be less than 1. Volume ratio can be also calculated byProgram difficulty level (D) and effort(E) can be calculated by equations: D = (n1/2)*(N2/n2) E = D * V
High level programming languages offer a very high ratio of machine instructions over language expressions. In other words, a few high language statements can accomplish a lot, allowing the programmer to focus on solving the specific application's problem rather than reinventing the proverbial wheel or spending time with software engineering housekeeping duties.
ratio of secondry voltage to primary voltage is called voltage transformation ratio
five
The ratio of RB1 to RBBO is the intrinsic standoff ratio. It is the standoff voltage ratio to the power supply voltage.
Rational numbers. write a ratio to express the number of people who preferred wanr to those who preferred wclm
Because that is the definition of irrational numbers: They are the numbers that cannot be written as a ratio of two integers! A fraction is a ratio of two integers.
3/11
28/42
It is 59/1000.
You can write this as 51:36.Note: You can simplify ratios the same way you simplify fractions; that is, if you find a number that is a factor of BOTH numbers, you can divide both numbers by that factor, to get an equivalent ratio.
the numbers in a ratio called TERMS
The numbers for the golden ratio are 1.618
50 : 45 = 10/9
a ratio is a comparison of 2 numbers
3/10. Also, you can multiply both numbers of the ratio, 3/10, by any non-zero number. You will have an equivalent ratio.
The ratio of odd numbers to even numbers is 1 : 1 or 50-50.