All posts by admin

Beecrowd 1040 Average 3 Solution in C, C++, Python

Question

Beecrowd 1040 Average 3 Solution in C,C++,Python

#include <stdio.h>
int main()
{
    float a, b, c, d, e, i, j, k;
    double avg, avrg;
    scanf("%f %f %f %f", &a, &b, &c, &d);
    avg = ((a*2) + (b*3) + (c*4) + d) / 10;
    printf("Media: %.1lf\n", avg);
    if ( avg < 5.0 ){
        printf("Aluno reprovado.\n");
    }
    else if( avg >= 7.0 ){
        printf("Aluno aprovado.\n");
    }
    else{
        printf("Aluno em exame.\n");//Beecrowd  1040 Average 3 Solution
        scanf("%f",&e);
        printf("Nota do exame: %.1f\n",e);
        avrg = (avg+e) / 2;
        if ( avrg >= 5.0 ){
            printf("Aluno aprovado.\n");
        }
        else {printf ("Aluno reprovado.\n");
        }
        printf("Media final: %.1lf\n",avrg);
    }
    return 0;
}

Next Problem: Beecrowd 1045 solution in C,C++,Python

Beecrowd 1045 Triangle Types solution in C, C++, Python

Beecrowd 1045 Triangle Types solution

Question

BEE 1045 – Triangle Types Solution in C

BEE 1045 – Triangle Types Solution in C++

#include <bits/stdc++.h>
using namespace std;


int main() {
    double a, b, c, temp, i, j;
    cin >> a >> b >> c;

    if (a < b) {
        temp = a;
        a = b;
        b = temp;
    }
    if (a < c) {
        temp = a;
        a = c;//Beecrowd 1045 Triangle Types solution 
        c = temp;
    }
    if (b < c) {
        temp = b;
        b = c;
        c = temp;
    }

    i = b * b + c * c;
    j = a * a;

    if (a >= b + c) {
cout << "NAO FORMA TRIANGULO" <<endl;
    } else {
        if (j == i) {
cout << "TRIANGULO RETANGULO" << endl;
        }
        if (j > i) {
cout << "TRIANGULO OBTUSANGULO" << endl;
        }
        if (j < i) {
cout << "TRIANGULO ACUTANGULO" <<endl;
        }
        if (a == b && b == c) {
cout << "TRIANGULO EQUILATERO" <<endl;
        } else if (a == b || b == c || c == a) {
cout << "TRIANGULO ISOSCELES" <<endl;
        }
    }

    return 0;
}

BEE 1045 – Triangle Types Solution in Python

def main():
    a, b, c = map(float, input().split())
    temp = 0
    i = 0
    j = 0

    if a < b:
        temp = a
        a = b
        b = temp
    if a < c:
        temp = a
        a = c
        c = temp
    if b < c:
        temp = b
        b = c
        c = temp

    i = b * b + c * c
    j = a * a

    if a >= b + c:
        print("NAO FORMA TRIANGULO")
    else:
        if j == i:
            print("TRIANGULO RETANGULO")
        if j > i:
            print("TRIANGULO OBTUSANGULO")
        if j < i:
            print("TRIANGULO ACUTANGULO")
        if a == b and b == c:
            print("TRIANGULO EQUILATERO")
        elif a == b or b == c or c == a:
            print("TRIANGULO ISOSCELES")

if __name__ == "__main__":
    main()

Next problem: Beecrowd 1046 solution || URI – BEECROWD – BEE Online Judge Solution  1046-Game Time

Beecrowd 1046 solution || URI – BEECROWD – BEE Online Judge Solution  1046-Game Time || Uri 1046 solution in C, C++

submit link

Beecrowd 1046 solution || URI – BEECROWD – BEE 1046 Solution in C, C++

Question

Game Time

Read the start time and end time of a game, in hours. Then calculate the duration of the game, knowing that the game can begin in a day and finish in another day, with a maximum duration of 24 hours. The message must be printed in portuguese “O JOGO DUROU X HORA(S)” that means “THE GAME LASTED X HOUR(S)”

Input

Two integer numbers representing the start and end time of a game.

Output

Print the duration of the game as in the sample output.Beecrowd 1046

Input SampleOutput Sample
16 2O JOGO DUROU 10 HORA(S)
0 0O JOGO DUROU 24 HORA(S)
2 16O JOGO DUROU 14 HORA(S)

Beecrowd/Uri 1046 solution in C

#include <stdio.h>

int main() {

   int a,b;
   scanf("%d%d",&a,&b);
  if(a==b){
      printf("O JOGO DUROU 24 HORA(S)\n");
  }
  if(b>a){
      printf("O JOGO DUROU %d HORA(S)\n",b-a);
  }
  if(a>b){
      printf("O JOGO DUROU %d HORA(S)\n",(b+24)-a);//Beecrowd 1046 solution
  }
    return 0;
}

Beecrowd/Uri 1046 solution in C++

#include <iostream>
using namespace std;

int main() {
    int a, b;
    std::cin >> a >> b;

    if (a == b) {
   cout << "O JOGO DUROU 24 HORA(S)" <<endl;
    } else if (b > a) {
      cout << "O JOGO DUROU " << b - a << " HORA(S)" <<endl;
    } else {
       cout << "O JOGO DUROU " << (b + 24) - a << " HORA(S)" <<endl;
    }

    return 0;
}

Previous Post: Beecrowd 1044 solution || Beecrowd 1044 Multiples Solution in C & C++

Beecrowd 1020 Solution in C, C++ & Python

URI – BEECROWD – BEE Online Judge || Age In Days – URI – BEE 1020 Solution in C,C++, Python

Question

#include <stdio.h>

int main() {

   int d,y,m;
   scanf("%d",&d);
   y=0;
   m=0;
   y=d/365;
   d=d%365;
   m=d/30;
   d=d%30;
   printf("%d ano(s)\n%d mes(es)\n%d dia(s)\n",y,m,d);
    return 0;
}

Bee1020 Solution in C++

#include <iostream>
using namespace std;

int main() {
    int d, y, m;
   cin >> d;
    y = 0;
    m = 0;
    y = d / 365;
    d = d % 365;
    m = d / 30;
    d = d % 30;
    cout << y << " ano(s)\n" << m << " mes(es)\n" << d << " dia(s)\n";
    return 0;
}

Bee1020 Solution in Python

d = int(input())
y = 0
m = 0
y = d // 365
d = d % 365
m = d // 30
d = d % 30
print(f"{y} ano(s)\n{m} mes(es)\n{d} dia(s)")

Beecrowd 1019 solution || URI – BEECROWD – BEE 1019 Time Conversion Solutions in C, C++, and Python

CSE Subject || CSE subject list in Bangladesh || BUBT 2023 || Engineering in Computer Science

CSE Subject List in Bangladesh || CSE Full Course According to BUBT

BUBT is 163 credits consisting of 120 theory credits 37 lab credits and a capstone project of 6 credits.

FIRST-YEAR

CSE Subject list 1st Semester :

Course Title.CreditsCourse No
Structured Programming Language 3CSE 101
Structured Programming Language Lab1.5CSE 102
Electrical Technology3CSE 107
Electrical Technology Lab1.5CSE 108
Differential and Integral Calculus3MAT111
Physics3PHY
English Language-I3ENG101
Principles of Economics3ECO

Total Credit 1st semester 20 credit

CSE Subject 2nd Semester Full Course :

Course Title.Credits
Object-Oriented Programming Language3
Object-Oriented Programming Language Lab1.5
Electronic Devices and Circuits3
Electronic Devices and Circuits Lab1.5
Statistics3
Discrete Mathematics3
Co-Ordinate Geometry and Vector Calculus3
English Language-II3
Software Development I0.75

Total Credit 2nd semester 21.75 credit

SECOND YEAR

CSE 3rd Semester Full Course :

Course Title.Credits
Data Structures3
Data Structures Lab1.5
Digital Logic Design3
Data Structures Lab1.5
Accounting Fundamentals2
Theory of Computing & Automata Theory3
Linear Algebras and Differential Equations3
Data Communication 3

Total Credit 3rd semester 20 credit

CSE 4th Semester Full Course :

Course Title.CreditsCourse No
Algorithms3CSE240
Algorithms LAB1.5CSE241
Database Systems3CSE207
Database Systems LAB1.5CSE208
Complex Variable and Fourier Analysis3MAT231
Compiler Design3CSE323
Compiler Design LAB.75CSE324
Numerical Analysis Lab
.75CSE224
Computer Architecture3CSE215
Software Development II.75CSE200

Total Credit 4th semester 20.25 credit

3rd and 4th Year

COURSE NOCOURSE TITLECREDITPREREQUISITE
CSE 300Software Development III0.75CSE 207
CSE 309Operating Systems3CSE 111
CSE 310Operating Systems Lab1.5CSE 111
CSE 313Mathematical Analysis for Computer Science3STA 231
CSE 315Microprocessor and Interfacing3CSE 215
CSE 316Microprocessor and Interfacing Lab1.5CSE 215
CSE 317System Analysis and Design3CSE 207
CSE 318System Analysis and Design Lab1.5CSE 207
CSE 319Computer Network3CSE 209
CSE 320Computer Network Lab1.5CSE 209
CSE 323Compiler Design3CSE 213
CSE 324Compiler Design Lab0.75CSE 213
CSE 327Software Engineering3CSE 317
CSE 328Software Engineering Lab0.75CSE 317
CSE 331Advanced Programming3CSE 121
CSE 332Advanced Programming Lab1.5CSE 121
CSE 341Computer Graphics3CSE 241
CSE 342Computer Graphics Lab0.75CSE 241
CSE 351Artificial Intelligence and Expert System3CSE 103
CSE 352Artificial Intelligence and Expert System Lab1.5CSE 103
CSE 400Software Development IV0.75CSE 300
CSE 407Project Management and Professional Ethics2
CSE 411Digital Electronics and Pulse Technique3CSE 205
CSE 412Digital Electronics and Pulse Technique Lab1.5CSE 205
CSE 413Cyber Security and Digital Forensic3CSE 319
CSE 414Cyber Security and Digital Forensic Lab1.5CSE 319
CSE 417Distributed Database Management Systems3CSE 207
CSE 418Distributed Database Management Systems Lab1.5CSE 207
CSE 425Microcontroller and Embedded Systems3CSE 315
CSE 426Microcontroller and Embedded Systems Lab1.5CSE 315
CSE 431Communication Engineering3CSE 209
CSE 433Fiber Optics Communication3CSE 209
CSE 435Network Security3CSE 319
CSE 437Digital Signal Processing3CSE 411
CSE 438Digital Signal Processing Lab1.5CSE 411
CSE 439Wireless Networking3CSE 319
CSE 440Wireless Networking Lab1.5CSE 319
CSE 441Switching and Routing3CSE 319
CSE 442Switching and Routing Lab1.5CSE 319
CSE 443Delay Tollerant Network3CSE 319
CSE 444Delay Tollerant Network Lab1.5CSE 319
CSE 445Introduction to Cryptography3CSE 319
CSE 446Introduction to Cryptography Lab1.5CSE 319
CSE 447Mobile Communication3CSE 209
CSE 448Mobile Communication Lab1.5CSE 209
CSE 449Network Administration3CSE 319
CSE 450Network Administration Lab1.5CSE 319
CSE 451Software Project Management3CSE 327
CSE 453Software Testing & Quality Assurance3CSE 327
CSE 455Software Security & Authentication3CSE 327
CSE 457Web Database Programming3CSE 207
CSE 458Web Database Programming Lab1.5CSE 207
CSE 459Visual Programming3CSE 207
CSE 460Visual Programming Lab1.5CSE 207
CSE 461Software Architecture3CSE 327
CSE 462Software Architecture Lab1.5CSE 327
CSE 463Software Design Pattern3CSE 327
CSE 464Software Design Pattern Lab1.5CSE 327
CSE 465Machine Learning3CSE 351
CSE 467Pattern Recognition3CSE 351
CSE 469Basic Graph Theory3CSE 341
CSE 471Computational Geometry3CSE 213
CSE 473Simulation and Modeling3CSE 351
CSE 474Simulation and Modeling Lab1.5CSE 351
CSE 475Data Mining3CSE 351
CSE 476Data Mining Lab1.5CSE 351
CSE 477Neural Network and Fuzzy Systems3CSE 351
CSE 478Neural Network and Fuzzy Systems Lab1.5CSE 351
CSE 479VLSI Design3CSE 351
CSE 480VLSI Design Lab1.5CSE 351
CSE 481Decision Support System3CSE 351
CSE 482Decision Support System Lab1.5CSE 351
CSE 483Knowledge Engineering3CSE 351
CSE 484Knowledge Engineering Lab1.5CSE 351
CSE 485Parallel Processing3CSE 319
CSE 487Robotics and Computer Vision3CSE 319
CSE 489Fault Tolerant System3CSE 319
CSE 491Interfacing & Peripherals3
CSE 492Interfacing & Peripherals Lab1.5
CSE 493Digital System Design3CSE 411
CSE 494Degital System Design Lab1.5CSE 411
CSE 498Project/Thesis4
CSE 499Capstone Project4CSE 300

Engineering in Computer Science and Engineering degree at BUBT is 163 credits consisting of 120 theory credits and 37 lab credits and a capstone project of 6 credits. The assignment of credits to a theoretical course follows a different rule from that of a sessional course.CSE Subject list.

Computer Programming

Bubt Assignment Cover Page 

Beecrowd 1019 solution || URI – BEECROWD – BEE 1019 Time Conversion Solutions in C, C++, and Python – Comprehensive Guide

URI – BEECROWD – BEE 1019 Time Conversion Solutions in C, C++, and Python || Beecrowd 1019 solution

Question

Understand the challenge: Beecrowd 1019 solution


Beecrowd 1019 solution presents the classic scheduling challenge: time shifting. In the challenge, times in seconds are converted to hours, minutes and seconds. This seemingly simple task requires a deep understanding of time distribution and variables. Our team of experts cracked the challenge and developed a comprehensive solution that not only solves the problem but also provides insight into the underlying concepts.

The essence of the time change


Time is a universal constant, but its representation varies from situation to situation. In programming, time is usually represented in seconds, and should be converted to a more human-readable format. This is where seasonal change becomes inevitable. Time conversion efficiency enables programmers to create applications that display time in a user-friendly manner, synchronize events, and perform robust calculations based on time intervals

Building the Solution: C, C++, Python Style


Our experts carefully developed a solution for URI Online Judge 1019 using three popular programming languages: C, C++ and Python. The solution not only provides a successful conversion but also demonstrates the versatility of these languages. Let’s take a closer look at each function:

URI – BEECROWD – BEE 1019 Time Conversion Solutions in C, C++, and Python ||Beecrowd 1019 solution

URI Online Judge 1019 Solve  in C : 
#include <stdio.h>

int main() {

int h,m,s;
scanf("%d",&s);
h=0;
m=0;
h=s/3600;
s=s%3600;
m=s/60;
s=s%60;
printf("%d:%d:%d\n",h,m,s);//Beecrowd 1019 solution
    return 0;
}

INPUT: 556

OUTPUT: 0:9:16

URI Online Judge 1019 Solve  in C++ : 

#include<iostream>
using namespace std;

int main() {

int h,m,s;
cin>>s;
h=0;
m=0;
h=s/3600;
s=s%3600;
m=s/60;
s=s%60;
cout<<":"<<h<<":"<<m<<":"<<s<<endl;

    return 0;
}

INPUT: 556

OUTPUT: 0:9:16

URI Online Judge 1019 Solve  in Python : 

total_seconds = int(input())

hours = total_seconds // 3600
minutes = (total_seconds % 3600) // 60
seconds = total_seconds % 60

print(f"{hours}:{minutes}:{seconds}")

INPUT: 556

OUTPUT: 0:9:16

Conclusion

One crucial ability that cuts across language borders is time management. When this ability is honed, programmers can produce effective, user-friendly apps that faithfully depict the past. Our thorough guide offers complete solutions in C, C++, and Python for the URI Online Judge 1019 problem. For your benefit, we have also examined cutting-edge subjects and offered examples. You are equipped with this manual to tackle time-varying issues and hone your organizing abilities.

Start learning to program today with [Free Code Center]. Coding is fun!

Uri 1080 Solution || BEE 1080 || Beecrowd1080 Highest and Position

Uri 1080 Solution || BEE 1080 || Beecrowd1080 Highest and Position

Beecrowd1080 Highest and Position question

Uri 1080 Solution || BEE 1080 ||Free Code Center

Highest and Position

Adapted by Neilor Tonin, URI  Brazil

Timelimit: 1

Read 100 integer numbers. Print the highest read value and the input position.

Input

The input file contains 100 distinct positive integer numbers.

Output

Print the highest number read and the input position of this value, according to the given example.

Input SampleOutput Sample
2
113
45
34565
6

8
 
34565
4
URI / BEECROWD Online Judge 1080 Solve  in C :  
#include <stdio.h>
 
int main() {
 
   int a,i,l=0,p=0;
   for(i=1;i<=100;i++){
       scanf("%d",&a);
       if(a>l){
         l=a; 
        p=i; 
       }
   }
   printf("%d\n",l);
   printf("%d\n",p);
 
    return 0;
}
URI / BEECROWD Online Judge 1080 Solve  in C++:  
#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
   int a,i,l=0,p=0;
   for(i=1;i<=100;i++){
   cin>>a;
       if(a>l){
         l=a; 
        p=i; 
       }
   }
cout<<l<<endl;
cout<<p<<endl;
    return 0;
}

Previous Problem: Beecrowd 1178 Array Fill III Solution

C++ Program to Read an Amount and Find Number of Notes

C++ program to count all notes in a certain quantity – In this unique essay, we’ll go over the many C++programming techniques for counting all the notes in a certain quantity.

The following are the methods used in C++ programming to determine how many notes overall there are in a given quantity:

  • Using the Standard Procedure
  • Making Use of User-Defined Function
  • Employing Pointers

As we all know, with cash bundles, a number of notes combine to equal the exact quantity of money that the person in question needs.

Similar to that, this blog discusses the various methods for counting the number of notes in a certain amount. In a bundle, a single note’s multiples are multiplied.

The total number of notes in a particular quantity can be counted using a C++ program. Check out the whole code with example programs and sample outputs here. You can check out more introductory C++ programs here.

Thus, there are a number of ways to calculate notes in a given quantity in C++ programming, as follows:

C++ Program to Read an Amount and Find Number of Notes

Logic to count minimum number of denomination for given amount

There are numerous efficient algorithms available to address the given issue. To simplify things for this experiment, I utilized the greedy method.

Using descriptive logic, determine the least amount of denominations.

Amount entered by the user. Put it in a variable, like amt.
If the amount is higher than 500, divide it by 500 to get the maximum number of notes needed, which is 500. Put the result of the division in a variable, such as note500 = amt / 500;.
Divide the original sum by 500 notes, and then deduct the result. Execute note500 * 500 – amt.

For each note, repeat the previous step 200, 100, 50, 20, 10, 5, 2, and 1.

#include<iostream>

using namespace std;

class money{

public:

    int note_size[9]={1000,500,200,100,50,20,10,5,2};

    int note_count[9]={0};

     money(int amount){

        for (int i=0;i<9;i++){

            if(amount>=note_size[i]){

                note_count[i]=amount/note_size[i];

                amount=amount%note_size[i];

            }

        }

        cout<<"counted notes >>"<<endl;

        for (int i=0;i<9;i++){

            if(note_count[i]!=0){ cout<<note_size[i]<<" taka x"<<note_count[i]<<endl;

            }   }                 }  };

int main(){   int amount;

cout<<"enter total amount : "; //C++ Program to Read an Amount and Find Number of Notes

cin >>amount;

money ob(amount);

return 0;}

Output:

C++ Program to Read an Amount and Find Number of Notes

Understanding Conditional Statements in C Programming, If Else in C

Program To Calculate Average In C

Introduction:

C is one of the most potent and flexible programming languages available today. Any C program has to understand how to compute averages and other mathematical operations. The fundamental idea of enables programmers to efficiently examine and work with data.

We shall examine the typical world of C programming in this essay. We’ll talk about averages, how to calculate them, and how to successfully use them to planning. Whether you are a seasoned C programmer or just getting started, this article will provide you with insightful knowledge and a clear understanding of what average infeels are like.
The sum of a group of numbers divided by the total number is the average. It can be characterized as

Average is equal to the total of all values divided by the total number of values.

Program To Calculate Average In C

Implementation

This algorithm’s implementation is shown below:

#include<stdio.h>
void main()
{
    int i,n,sum=0 ;double aver=0;
    printf("enter the number:");
    scanf("%d",&n);
    for(i=1;i<=10;i++){
        sum=sum+i;
        aver=sum/(double)10;
    }
 printf("The sum of 10 no is :%d\n",sum);
 printf("The Average is :%lf",aver);
}

Input :Enter the number:6

Output:
The sum of 6 no is :21
The Average is :2.100000

Implementation 2

Implementation of this algorithm is given below

#include <stdio.h>

int main() {
    int data[] = {10, 20, 30, 40, 50}; // Sample data
    int n = sizeof(data) / sizeof(data[0]);
    int sum = 0;

    for (int i = 0; i < n; i++) {
        sum += data[i];
    }

    float average = (float)sum / n;
    printf("The average is: %.2f", average);
    return 0;
}

Output : The average is: 30.00

Array example in c

Understanding Conditional Statements in C Programming, If Else in C

Nested if else in C Programming Examples1

Nested if else in c programming examples

#include <stdio.h>
int main()
{ int s;
    printf ("enter your score =");
    scanf("%d",&s);

    if(s>=80 && s<=100){
        printf("A+");
    }
else if(s>=75 && s<=79){



printf("A= 3.75");
}

else if(s>=70 && s<=74){

printf("A-=3.50");
}
else if(s>=65&&s<=69){

    printf("B+=3.25");

}
else if(s>=60 && s<=64){

  printf("B=3.00");
}
else if(s>=55 && s<=59){

    printf("B-=2.75");
}
else if(s>=50 && s<=54){

     printf("c+=2.5");
 }
else if(s>=45&&s<=49){
    printf("c=2.25");
}
else if(s>=40&&s<=44){

    printf("D=2.0");
}
else{
    printf("Failed? ");
    printf("         000000        \n");
    printf("     ((^^^^^^^^^^))      \n ");
    printf("    (( ^^   ^^  ))     \n");
    printf("     ((  0    0  ))    \n");
    printf("     ((    00    ))    \n");
    printf("      (( <||||> ))     \n");
    printf("        ((____))       \n");



}
}

Understanding Conditional Statements in C || C programming examples

See more

Factorial Program in C || What is the factorial of 100 in C