C & C++ PROGRAMMING
Kanalga Telegram’da o‘tish
https://t.me/addlist/oJIs6WVKrqBmMWQ1 Hello! I am @Myhurthearts and welcome to the Coding channel! Here we can learn all things related to coding and improve our skills , just let me know!
Ko'proq ko'rsatishMa'lumot yo'q
Obunachilar
Ma'lumot yo'q24 soatlar
+337 kunlar
+17130 kunlar
Postlar arxiv
Free Study Resources join more ✅ https://t.me/addlist/c3QWwWR-Iw4xMDNl
Subscribe Our channel for coding, designing, hacking and computer related
👉✅ https://youtube.com/@CODEBOMBB
🔰ᴏᴜʀ ᴀʟʟ ɢʀᴏᴜᴘs🔰
┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ᴄᴏᴅɪɴɢ ɢʀᴏᴜᴘ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ɢʀᴏᴜᴘ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʟʙsᴛɪ ɢʀᴏᴜᴘ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʙᴄᴀ ɢʀᴏᴜᴘ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈
🔰ʜᴀᴄᴋɪɴɢ ᴄʜᴀɴɴᴇʟs🔰
┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ᴛᴏᴏʟs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ᴛɪᴘs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴛᴇʀᴍᴜx ᴛᴏᴏʟ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʟɪɴᴜx ᴛᴏᴏʟs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈
🔰 ᴘʀᴏɢʀᴀᴍᴍɪɴɢs 🔰
┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ᴄ ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴄ++ ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴄ# ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴊᴀᴠᴀ ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴄss ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴘʏᴛʜᴏɴ ᴄᴏᴅᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴊᴀᴠᴀsᴄʀɪᴘᴛ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴛᴍʟ ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴘʜᴘ ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ɴᴏᴅᴇᴊs ᴄᴏᴅɪɴɢ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ɢɪᴛʜᴜʙ ᴛᴏᴏʟs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴍᴇᴍᴇ ᴢᴏɴᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ғʀᴇᴇ ᴄᴏᴜʀsᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋᴇʀ sᴄʀɪᴘᴛ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈
🔰ʙᴄᴀ/ᴍᴄᴀ/ʙ.ᴛᴇᴄʜ ɴᴏᴛᴇs🔰
┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ 1sᴛ sᴇᴍᴇsᴛᴇʀ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 2ɴᴅ sᴇᴍᴇsᴛᴇʀ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 3ʀᴅ sᴇᴍᴇsᴛᴇʀ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 5ᴛʜ sᴇᴍᴇsᴛᴇʀ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 6ᴛʜ sᴇᴍᴇsᴛᴇʀ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈
🔰ғᴜʟʟ ᴘʀᴇᴍɪᴜᴍ ᴄᴏᴜʀsᴇ🔰
┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ᴀɪ ғᴜʟʟ ᴄᴏᴜʀsᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴘʏᴛʜᴏɴ ᴄᴏᴜʀsᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʟɪɴᴜx ᴄᴏᴜʀsᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴊᴀᴠᴀsᴄʀɪᴘᴛ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʀᴇᴀᴄᴛ ᴄᴏᴜʀsᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ғɪʟᴇs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴍᴏʙɪʟᴇ ᴀᴘᴘs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴅᴇʟᴛᴀ ʙᴀᴛᴄʜ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈
Subscribe our channel for coding - https://youtube.com/@CODEBOMBS
✅Data structures and algorithms most important list
🔰Join for more course 🔰 https://t.me/addlist/c3QWwWR-Iw4xMDNl
🔰sᴜʙsᴄʀɪʙᴇ ᴏᴜʀ ᴄʜᴀɴɴᴇʟ ғᴏʀ ᴛᴇʀᴍᴜx ᴠɪᴅᴇᴏ ᴀɴᴅ ᴛɪᴘs & ᴛʀɪᴄᴋs🔰
https://youtube.com/@CODEBOMBS
//cpp program to ✅ perfect number
#include <iostream>
bool isPerfect(int num) {
int sum = 1; // Start with 1 since every number is divisible by 1
for (int i = 2; i * i <= num; i++) {
if (num % i == 0) {
if (i * i != num) // Ensure not to count square root twice
sum += i + num / i;
else
sum += i;
}
}
return sum == num && num != 1; // Check if the sum of divisors equals the number itself
}
void printPerfectNumbers(int start, int end) {
std::cout << "Perfect numbers between " << start << " and " << end << " are:\n";
for (int i = start; i <= end; i++) {
if (isPerfect(i))
std::cout << i << std::endl;
}
}
int main() {
int start, end;
std::cout << "Enter the range to find perfect numbers (start end): ";
std::cin >> start >> end;
printPerfectNumbers(start, end);
return 0;
}
🔰ᴏᴜʀ ᴀʟʟ ɢʀᴏᴜᴘs🔰
┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ᴄᴏᴅɪɴɢ ɢʀᴏᴜᴘ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ɢʀᴏᴜᴘ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʟʙsᴛɪ ɢʀᴏᴜᴘ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʙᴄᴀ ɢʀᴏᴜᴘ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈
🔰ʜᴀᴄᴋɪɴɢ ᴄʜᴀɴɴᴇʟs🔰
┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ᴛᴏᴏʟs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ᴛɪᴘs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴛᴇʀᴍᴜx ᴛᴏᴏʟ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʟɪɴᴜx ᴛᴏᴏʟs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈
🔰 ᴘʀᴏɢʀᴀᴍᴍɪɴɢs 🔰
┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ᴄ ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴄ++ ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴄ# ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴊᴀᴠᴀ ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴄss ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴘʏᴛʜᴏɴ ᴄᴏᴅᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴊᴀᴠᴀsᴄʀɪᴘᴛ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴛᴍʟ ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴘʜᴘ ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ɴᴏᴅᴇᴊs ᴄᴏᴅɪɴɢ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ɢɪᴛʜᴜʙ ᴛᴏᴏʟs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴍᴇᴍᴇ ᴢᴏɴᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ғʀᴇᴇ ᴄᴏᴜʀsᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋᴇʀ sᴄʀɪᴘᴛ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈
🔰ʙᴄᴀ/ᴍᴄᴀ/ʙ.ᴛᴇᴄʜ ɴᴏᴛᴇs🔰
┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ 1sᴛ sᴇᴍᴇsᴛᴇʀ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 2ɴᴅ sᴇᴍᴇsᴛᴇʀ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 3ʀᴅ sᴇᴍᴇsᴛᴇʀ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 5ᴛʜ sᴇᴍᴇsᴛᴇʀ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 6ᴛʜ sᴇᴍᴇsᴛᴇʀ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈
🔰ғᴜʟʟ ᴘʀᴇᴍɪᴜᴍ ᴄᴏᴜʀsᴇ🔰
┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ᴀɪ ғᴜʟʟ ᴄᴏᴜʀsᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴘʏᴛʜᴏɴ ᴄᴏᴜʀsᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʟɪɴᴜx ᴄᴏᴜʀsᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴊᴀᴠᴀsᴄʀɪᴘᴛ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʀᴇᴀᴄᴛ ᴄᴏᴜʀsᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ғɪʟᴇs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴍᴏʙɪʟᴇ ᴀᴘᴘs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴅᴇʟᴛᴀ ʙᴀᴛᴄʜ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈
Subscribe our channel for coding - https://youtube.com/@CODEBOMBS
Hi, you can start Placement Preparation with me in Sigma, 🔥Sigma Placement Batch (DSA + Development) :
Download link - 🔗 😁 https://drive.google.com/drive/u/0/mobile/folders/1BQzrA3ERRcPGEcbqWDfpFESboDbviF07
Free Study Resources join more ✅ https://t.me/addlist/c3QWwWR-Iw4xMDNl
Subscribe please -
👉✅ https://youtube.com/@CODEBOMBS
/cpp
//#1 Operating with variables
#include<iostream>
using namespace std;
int main (){
int a,b;
a = 6;
b=3;
a=a+1;
int result = a-b;
cout<< "Printing the result "<<result<<endl;
return 0;
}
// #1 Operating with variables
/cpp
#include<iostream>
using namespace std;
int main (){
int a,b;
a = 6;
b=3;
a=a+1;
int result = a-b;
cout<< "Printing the result "<<result<<endl;
return 0;
}
Subscribe our channel for coding, design, programming, Coreldraw, Excel, termux hacking, python animation, and more
Subscribe please -
👉✅ https://youtube.com/@CODEBOMBS
NOTE - Alpha delta and supreme batch course are include in this channel
Free for all 😁feel free to ask @imabhi3030
Javascript full course - https://t.me/Javascript_Course_js
full stack web devloper course - https://t.me/web_devloper_bro
Ethical hacking full course - https://t.me/Ethical_hackings_course
Reacts & nodejs full course - https://t.me/Reacts_Course
Linux full course - https://t.me/Linux_Courses
Python devloper full course - https://t.me/Python_Devloper
Machine learning & ai course - https://t.me/Machine_learnings_Ai
Android apps devloper full course - https://t.me/Mobile_Apps_devlopment
JOIN ALL IMPORTANT COURSE - 👉🏻 https://t.me/addlist/c3QWwWR-Iw4xMDNl
// Numbers swaping by using Class with friend functions
#include<iostream>
using namespace std;
class c2;
class c1{
int val1;
public:
void setData(int num1){
val1=num1;
}
friend void swap(c1 &, c2 &);
void display(void){
cout<<val1<<endl;
}
};
class c2{
int val2;
public:
void setData(int num2){
val2=num2;
}
friend void swap(c1 &, c2 &);
void display(void){
cout<<val2<<endl;
}
};
void swap(c1 &a, c2 &b){
int temp;
temp = a.val1;
a.val1 = b.val2;
b.val2 = temp;
}
int main()
{
c1 d;
d.setData(33);
c2 e;
e.setData(45);
cout<<"The Value of d is without exchanging ";
d.display();
cout<<"The Value of e is without exchanging ";
e.display();
swap(d,e);
cout<<"\n\nThe Value of d is after exchanging ";
d.display();
cout<<"The Value of e is after exchanging ";
e.display();
return 0;
}// Complex Numbers adding using friend class
#include<iostream>
using namespace std;
class Complex; // Declared a class which we want to use by our calculator class
class Calculator{
public:
int add(int n1, int n2){
return (n1 + n2);
}
int sumRealComplex(Complex , Complex);
int sumCompComplex(Complex ,Complex);
};
class Complex{
int a,b;
public:
// Giving access to calculator class functions to access private objects of Complex Class
//friend int Calculator:: sumRealComplex(Complex , Complex );
//friend int Calculator:: sumCompComplex(Complex ,Complex );
// or
// We Can give access to all calcu.. Class
friend class Calculator; //Full Class friend
friend Complex sumComplex(Complex o1, Complex o2);
void setNumber(int n1, int n2){
a=n1;
b=n2;
}
void printNumber(){
cout<<"Your number is "<<a<<" + "<<b<<"i"<<endl;
}};
Complex sumComplex(Complex o1, Complex o2){
Complex o3;
o3.setNumber((o1.a + o2.a), (o1.b + o2.b));
return o3;
}
int Calculator::sumRealComplex(Complex a1, Complex a2){
return (a1.a + a2.a);
}
int Calculator::sumCompComplex(Complex b1,Complex b2){
return (b1.b + b2.b);
}
int main(){
Complex c1,c2, j;
int a,b,c,d;
cout<<"Enter real part of first complex number: ";
cin>>a;
cout<<"Enter imaginary part of first complex number: ";
cin>>b;
cout<<"Enter real part of second complex number: ";
cin>>c;
cout<<"Enter imaginary part of second complex number: ";
cin>>d;
cout<<"\n\n";
c1.setNumber(a, b);
c1.printNumber();
c2.setNumber(c, d);
c2.printNumber();
Calculator calc;
j = sumComplex(c1, c2);
j.printNumber();
int res = calc.sumRealComplex(c1, c2);
cout<<"\nThe sum of Real numbers is "<<res<<endl;
int resC = calc.sumCompComplex(c1, c2);
cout<<"The sum of Complex numbers is "<<resC<<endl;
return 0;
}// Multiple Numbers adder
#include<iostream>
using namespace std;
class Adder{
public:
int num[100];
int n=0;
void entNum(void);
void numShow(void);
void printCal(void);
};
void Adder::entNum(void){
int i=0;
char c;
for(;i<50;i++){
cout<<"Enter "<<i+1<<"s number : ";
cin>>num[i];
n++;
if(i<1)
continue;
cout<<"Are you want add more type y or n ";
cin>>c;
if(c=='n')
break;
} }
void Adder::numShow(void){
cout<<"\n\nYou entered ";
for(int i=0;i<n;i++){
cout<<num[i]<<" ";
}}
void Adder::printCal(void){
int i=0;
int res=0;
for(;i<n;i++){
res=res+num[i];
}
cout<<"\nTotal = "<<res;
}
int main (){
Adder add;
cout<<"Number Adder\n"<<endl;
add.entNum();
add.numShow();
add.printCal();
return 0;
}// Basic program to print area of circle
#include<iostream>
using namespace std;
int main (){
float r=4;
float area=3.14*r*r;
cout<<area;
return 0;
}// Basic program to play with data type
#include<iostream>
using namespace std;
int main (){
int a=5;
float b=2;
float c=a/b;
cout<<c ;
cout<<a+b;
return 0;
}// Basic program which inputs 2 numbers and shows them
#include<iostream>
using namespace std;
int main (){
int num, num1;
cout<<"Enter two number; ";
cin>>num;
cin>>num1;
cout<<"You entered; "<<num<<" and "<<num1;
return 0;
}