Write a program in python to calculate greatest common divisor of a number import math print("Greatest Common Divisor ") # prints 12 print("The gcd of 60 and 48 is : ", end="") print(math.gcd(60, 48)) # The gcd of 98 and 56 is : 14 # The gcd of 60 and 48 is : 12 ''' def hcf(a, b): if(b == 0): return a else: return hcf(b, a % b) a = 60 b = 48 # prints 12 print("The gcd of 60 and 48 is : ", end="") print(hcf(60, 48)) '''
In mathematics, a Cartesian coordinate system is a coordinate system that specifies each point uniquely in a plane by a set of numeric points. Cartesian Coordinates is represented by (x,y) . In mathematics, the polar coordinate system is a two-dimensional coordinate system in which each point on a plane is determined by a distance from a reference point known as radius and an angle from a reference direction known as theta or simply angle. Polar Coordinates system is represented by (r,θ) . For the negative value of r in polar coordinates, what to do? Watch the given below youtube video to cover it. https://www.youtube.com/watch?v=kNANYzuOUpA Fig: Polar Coordinates Check this website for more knowledge: https://openstax.org/books/calculus-volume-2/pages/7-3-polar-coordinates C++ PROGRAM : DEFINE TWO CLASSES POLAR AND RECTANGLE REPRESENT POINTS IN POLAR AND RECTANGULAR SYSTEM. USE SUITABLE MEMBER FUNCTIONS TO CONVERT FROM ONE SYSTEM TO ANOTHER...
USING CHARACTER ARRAY GENERATE MARKSHEET /* Write a program to generate marksheet assuming that the following information can be read from keyboard. a. Student name, b. roll number. c, registration number, d. total marks, e. division/grade */ #include <iostream> #include <iomanip> class marksheet{ int tmarks, roll; char name[20], rgno[20], div[20]; public: void uinput() { std::cout<<"Enter Values in Following Fields "; std::cout<<std::endl<<"NAME: "; std::cin>>name; std::cout<<"ROLL: "; std::cin>>roll; std::cout<<"REG. NO.: "; std::cin>>rgno; std::cout<<"TOTAL MARKS: "; std::cin>>tmarks; std::cout<<"DIVISION: "; std::cin>>div; ...
Comments
Post a Comment