//3rd term of G.P is 4.5 and 9th is 16.2 clear; clc; close; // nth term=a*r^(n-1) term3=4.5;//given data //'a*r^(3-1)=4.5 ---equ(1)' term9=16.2;//given //'a*r^(9-1)=16.2 ---equ(2)' mprintf("\n the common ratio is :\n"); format(7) r=(16.2/4.5)^(1/6)//equ(2)/equ(1)