-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsolveProblem.cpp
More file actions
59 lines (49 loc) · 1.35 KB
/
Copy pathsolveProblem.cpp
File metadata and controls
59 lines (49 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// ================================================
// Language: C++ / Cpp
// Topic: Solving Problems
// ================================================
// ===== 👉👉 🔹🔹 Question 1️⃣ : Calculate the area of a Circle (Unprofessional style example) =====
#include <iostream>
using namespace std;
int main()
{
float r = 5;
float a = r * r;
cout << "Area is: " << a * 3.1416;
cout << endl;
return 0;
}
// ===== 👉👉 🔹🔹 Question 1️⃣ : Calculate the area of a Circle (Professional style example 1) =====
#include <iostream>
using namespace std;
int main()
{
float radius = 4.3;
cout << "Area is: " << radius * radius * 3.1416;
cout << endl;
return 0;
}
// ===== 👉👉 🔹🔹 Question 1️⃣ : Calculate the area of a Circle (Professional style example 2) =====
#include <iostream>
using namespace std;
int main()
{
float r = 4.3;
cout << "Area is: " << r * r * 3.1416;
cout << endl;
return 0;
}
// ===== 👉👉 🔹🔹 Question 2️⃣ Calculating simple interest
#include <iostream>
using namespace std;
int main(){
float p = 60;
float r = 30;
float t = 3.2;
float si = (p*r*t) / 100;
cout<< "Simle Interest is " <<si;
cout<<endl;
return 0;
}
// 👉👉 🔹🔹 Question
// 1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣ 7️⃣ 8️⃣ 9️⃣ 🔟