Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 33f7552

Browse filesBrowse files
Add files via upload
1 parent 068207f commit 33f7552
Copy full SHA for 33f7552

File tree

Expand file treeCollapse file tree

15 files changed

+5313
-0
lines changed
Filter options
Expand file treeCollapse file tree

15 files changed

+5313
-0
lines changed

‎Tutorials/C++ Basic Tutorials/Question & Answer/C++ Question & Answer.md

Copy file name to clipboardExpand all lines: Tutorials/C++ Basic Tutorials/Question & Answer/C++ Question & Answer.md
+620Lines changed: 620 additions & 0 deletions
Large diffs are not rendered by default.

‎Tutorials/C++ Basic Tutorials/Simple Programs/ARRAY/Double Dimension Array/Array Program List.md

Copy file name to clipboardExpand all lines: Tutorials/C++ Basic Tutorials/Simple Programs/ARRAY/Double Dimension Array/Array Program List.md
Whitespace-only changes.

‎Tutorials/C++ Basic Tutorials/Simple Programs/ARRAY/Single Dimension Array/Array Program List.md

Copy file name to clipboardExpand all lines: Tutorials/C++ Basic Tutorials/Simple Programs/ARRAY/Single Dimension Array/Array Program List.md
Whitespace-only changes.
+308Lines changed: 308 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,308 @@
1+
# Basic C++ Program List
2+
3+
**Note:**
4+
- Give a STAR if you like this
5+
- FORK to get more update
6+
- Make a PULL REQUEST to countribute
7+
8+
<br>
9+
10+
*Put your phone in desktop mode for easy access*
11+
12+
<br>
13+
14+
15+
<hr>
16+
17+
<details><summary>ADDITION OF TWO NUMBER</summary>
18+
19+
```
20+
21+
#include <iostream>
22+
using namespace std;
23+
int main()
24+
{
25+
int a,b,c;
26+
cout<<"Enter first number\n";
27+
cin>>a;
28+
cout<<"Enter second number\n";
29+
cin>>b;
30+
c=a+b;
31+
cout<<"Add="<<c;
32+
}
33+
34+
```
35+
36+
<img>
37+
38+
39+
</details>
40+
41+
42+
43+
<hr>
44+
45+
<details><summary>SUBTRACTION OF TWO NUMBER</summary>
46+
47+
```
48+
49+
#include <iostream>
50+
using namespace std;
51+
int main()
52+
{
53+
int a,b,c;
54+
cout<<"Enter first number\n";
55+
cin>>a;
56+
cout<<"Enter second number\n";
57+
cin>>b;
58+
c=a-b;
59+
cout<<"Sub="<<c;
60+
}
61+
62+
```
63+
64+
<img>
65+
66+
67+
</details>
68+
69+
70+
71+
<hr>
72+
73+
<details><summary>MULTIPLICATION OF TWO NUMBER</summary>
74+
75+
```
76+
77+
#include <iostream>
78+
using namespace std;
79+
int main()
80+
{
81+
int a,b,c;
82+
cout<<"Enter first number\n";
83+
cin>>a;
84+
cout<<"Enter second number\n";
85+
cin>>b;
86+
c=a*b;
87+
cout<<"Multiply="<<c;
88+
}
89+
90+
```
91+
92+
<img>
93+
94+
95+
</details>
96+
97+
98+
<hr>
99+
100+
<details><summary>DIVISION OF TWO NUMBER</summary>
101+
102+
```
103+
104+
#include <iostream>
105+
using namespace std;
106+
int main()
107+
{
108+
int a,b,c;
109+
cout<<"Enter first number\n";
110+
cin>>a;
111+
cout<<"Enter second number\n";
112+
cin>>b;
113+
c=a/b;
114+
cout<<"Div="<<c;
115+
}
116+
117+
```
118+
119+
<img>
120+
121+
122+
</details>
123+
124+
125+
126+
127+
<hr>
128+
129+
<details><summary>AREA OF RECTANGLE</summary>
130+
131+
```
132+
133+
#include <iostream>
134+
using namespace std;
135+
int main()
136+
{
137+
int area,h,w;
138+
cout<<"Enter height of rectangle\n";
139+
cin>>h;
140+
cout<<"Enter width of rectangle\n";
141+
cin>>w;
142+
area=h*w;
143+
cout<<"Area of rectangle="<<area;
144+
}
145+
146+
```
147+
148+
<img>
149+
150+
151+
</details>
152+
153+
154+
155+
<hr>
156+
157+
<details><summary>AREA OF SQUARE</summary>
158+
159+
```
160+
161+
#include <iostream>
162+
using namespace std;
163+
int main()
164+
{
165+
int area,side;
166+
cout<<"Enter side of square\n";
167+
cin>>side;
168+
area=side*side;
169+
cout<<"Area of square="<<area;
170+
}
171+
172+
```
173+
174+
<img>
175+
176+
177+
</details>
178+
179+
180+
181+
182+
<hr>
183+
184+
<details><summary>AREA OF CIRCLE</summary>
185+
186+
```
187+
188+
#include <iostream>
189+
using namespace std;
190+
int main()
191+
{
192+
float area,r;
193+
cout<<"Enter radius of circle\n";
194+
cin>>r;
195+
area=3.14*r*r;
196+
cout<<"Area of circle="<<area;
197+
}
198+
199+
```
200+
201+
<img>
202+
203+
204+
</details>
205+
206+
207+
208+
209+
210+
<hr>
211+
212+
<details><summary>AREA OF TRIANGLE</summary>
213+
214+
```
215+
216+
#include <iostream>
217+
using namespace std;
218+
int main()
219+
{
220+
float area,b,h;
221+
cout<<"Enter base\n";
222+
cin>>b;
223+
cout<<"Enter height\n";
224+
cin>>h;
225+
area=0.5*b*h;
226+
cout<<"Area of triangle="<<area;
227+
}
228+
229+
```
230+
231+
<img>
232+
233+
234+
</details>
235+
236+
237+
238+
239+
<hr>
240+
241+
<details><summary>INPUT MARKS OF 5SUBJECT AND FIND THERE AVERAGE</summary>
242+
243+
**Note** Let each subject be Physics=p, Chemistry=c, Math=m, Geography=g, English=e
244+
245+
```
246+
247+
#include <iostream>
248+
using namespace std;
249+
int main()
250+
{
251+
float p,c,m,g,e,avg;
252+
cout<<"Enter marks in physics\n";
253+
cin>>p;
254+
cout<<"Enter marks in chemistry\n";
255+
cin>>c;
256+
cout<<"Enter marks in math\n";
257+
cin>>m;
258+
cout<<"Enter marks in geography\n";
259+
cin>>g;
260+
cout<<"Enter marks in english\n";
261+
cin>>e;
262+
avg=(p+c+m+g+e)/5;
263+
cout<<"Average of result="<<avg;
264+
}
265+
266+
```
267+
268+
<img>
269+
270+
271+
</details>
272+
273+
274+
275+
<hr>
276+
277+
<details><summary>SIMPLE INTEREST PROGRAM</summary>
278+
279+
```
280+
281+
#include <iostream>
282+
using namespace std;
283+
int main()
284+
{
285+
float p,r,t,si;
286+
cout<<"Enter principle\n";
287+
cin>>p;
288+
cout<<"Enter rate of interest\n";
289+
cin>>r;
290+
cout<<"Enter time\n";
291+
cin>>t;
292+
si=(p*r*t)/100;
293+
cout<<"Simple Interest="<<si;
294+
}
295+
296+
```
297+
298+
<img>
299+
300+
301+
</details>
302+
303+
304+
305+
306+
307+
308+

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.