// Problem 13 - Kvadrat tenglama
// Yechimi yo'q D<0
// Bitta yechim D==0 x = -b/2a
// Ikkita yechim D>0 x1 = (-b+sqrt(D))/(2*a); x2 = (-b-sqrt(D))/(2*a)
// float a, b, c, x1, x2, D;
// cout<<"Enter the coefitcents of Quadratic equation: "; cin>>a>>b>>c;
// D = pow(b,2) - 4*a*c;
// if(D<0){
// cout<<"Ildizi yo'q";
// }else if(D==0){
// x1 = -b/(2*a);
// cout<<"x = "<<x1;
// }else{
// x1 = (-b+sqrt(D))/(2*a);
// x2 = (-b-sqrt(D))/(2*a);
// cout<<"x1 = "<<x1<<endl;
// cout<<"x2 = "<<x2<<endl;
// }
// Yechimi yo'q D<0
// Bitta yechim D==0 x = -b/2a
// Ikkita yechim D>0 x1 = (-b+sqrt(D))/(2*a); x2 = (-b-sqrt(D))/(2*a)
// float a, b, c, x1, x2, D;
// cout<<"Enter the coefitcents of Quadratic equation: "; cin>>a>>b>>c;
// D = pow(b,2) - 4*a*c;
// if(D<0){
// cout<<"Ildizi yo'q";
// }else if(D==0){
// x1 = -b/(2*a);
// cout<<"x = "<<x1;
// }else{
// x1 = (-b+sqrt(D))/(2*a);
// x2 = (-b-sqrt(D))/(2*a);
// cout<<"x1 = "<<x1<<endl;
// cout<<"x2 = "<<x2<<endl;
// }
// 1.c
// int n; cin>>n;
// float S = 0;
// float P=1;
// for(float i=1; i<=n; i++){
// P*=i;
// S+=1/P;
// }
// cout<<"S = "<<S;
// int n; cin>>n;
// float S = 0;
// float P=1;
// for(float i=1; i<=n; i++){
// P*=i;
// S+=1/P;
// }
// cout<<"S = "<<S;
βΌοΈ Attention
We asked professor to give last year's midterm questions from CP1. But Prof doesn't want to give.
We asked professor to give last year's midterm questions from CP1. But Prof doesn't want to give.
π€¬7
Part 3.
Problem 1
Write a function that prints 100 random numbers
Problem 2
Write a function that calculates average grade of students
Problem 3
Write a function to find gcd of two numbers. Header should be like this: int gcd(int num1, int num2)
β€3