Posts

Friend function example with surce code in c++,

 Simple Friend function  #include<iostream> using namespace std; class myclass{ int a, b; public: friend int add(void); friend int sub(void); void setval(){ cout<<" value of a: "; cin>>a; cout<<"value of b: "; cin>>b; } }; int add(void){ myclass obj; obj.setval(); int tenp; //cout<<"A + B = "<<obj. a + obj.b; tenp =  obj.a + obj. b; return tenp; } int sub(void){ myclass obj ; obj. setval(); int temp; temp = obj. a - obj.b; return temp; } int main(){ int result,result2; result = add(); cout<<result<<endl; result2 = sub(); cout<<result2; return 0; }

Source code is here

                          #Code is here  #include <iostream> using namespace std; int main() {     for ( int i = 0; i<5; i++){           // cout<<""     cout<< "      oo     " <<endl;     cout<< "     oooo    " <<endl;     cout<< "    oooooo   " <<endl;     cout<< "   oooooooo  " <<endl;     cout<< "  oooooooooo " <<endl;     cout<< " oooooooooooo " <<endl;     cout<< "oooooooooooooo " <<endl;     cout<< "oooooooooooooo " <<endl;     cout<< " oooooooooooo " <<endl;  ...

#code C++ 2021

 Welcome to my blog.you can  SUBSCRIBE   my YouTube channel.               Code is here #include <iostream> #include <string> using namespace std; int main() {     const   int a= 2021;     int b;     const int c= 365;     const int d = 80;     cout << "Enter your date of birth: " ;     cin>>b;     cout<< "your Age is now: " <<((a-b))<<endl;     cout<< "your Available Age is: " <<((a - b)-d);     cout<< "\n your Age in Days: " <<((a-b)*c);     cout<< "\nyour Available Age in days:\n " <<(((a-b)-d)*c);     cout<< "\nYour Age in weeks: " <<(((a - b)*c)/7)<< " weeks" ;     return 0; }

A Birthday wish program source code in c++ simple

    Birthday Wish This is a program. Who wish you birthday at 300 times. and you coustmize. You are new so please SUBSCRIBE my YouTube channel. Much more source code.       Source Code is here  copy here to 👇👇👇👇 //[This is a simple Birthday wish program] #include <iostream> #include <string> using namespace std; int main(){ string user_input; //Take user input (string) cout<< "What is your name " <<endl; cin>>user_input; // here is user_input string wish = "HAPPY BIRTHDAY TO YOU👉" ; // you can customize your Type for ( int i = 1; i < 300; /* you can change the number of print*/ i++){ cout<<wish<<user_input<<endl; } // Making by Techrozo YouTube channel //Making Date:- 05/05/2021(Wednesday) } here👆👆👆👆👆👆

Making a simple game using c++ if/else and finctions

Image
   Simple Game C++   this is a simple game making c++ use functions and if/else statement and simple cout and cin. the game make is veary easy anyone can make the game. this is my blpg and my youtube channel you can subscribe the channel and help me to faster grow my channel. i hope you all help me                   code  #include <iostream> using namespace std; void start_game(){ char answer; int score = 1; cout<< "What is 1+1" <<endl; cout<< "(a)= 5" <<endl; cout<< "(b)= 6" <<endl; cout<< "(c)= 9" <<endl; cout<< "(d)= 2" <<endl; cout<< "choes a option " <<endl; cin>>answer; if (answer == 'd' ){ cout<< "you choes right answer" <<endl; cout<< "score::" <<score++<<endl; } else { cout<< "You choes wrong Answer" <<endl; } cout<< "Wha...

Write table in c ++ source code

 Table code In c++ #include <iostream> using namespace std; int main(){ int i = 1; int b; cout<< "enter  a number " ; cin>>b; if (b<100){ for ( int i = 1; i<11; i++){ cout<<i*b<<endl; } } else { cout<< "invalid num" ;} }

write a table for c++ use for loop

  Write table any number in this program  ==========Here is the code==========   #include <iostream> using namespace std; int main(){ int a = 1; int b; cout<< "Enter the number want table " <<endl; cin>>b; for ( int a =1; a<=10; a++){ cout<<a*b<<endl; } } Made by skeleton programmer 

Option choosing game made for c++

  Choosing a option game make by c++ So this a choose a option and get the output on the screen this is very interesting game.          Code #include <iostream> using namespace std; int main() { int a=1, b=2, c=3, d=4; int x; cout<< "choose a option " <<endl; cout<< "1\n2\n3\n4" <<endl; cout << "write your options " ; cin>>x; switch (x) { case 1: cout<< "you are ugly" ; break ; case 2: cout<< "you are intelligent " ; break ; case 3: cout<< "OK you are intelligent but you don't speak" ; break ; case 4: cout<< "OK you are dumb " ; break ; } cout << "\n====Thanks for useing====" ; return 0; } So this is the make by skeleton programmer

Find the value of sphere a program make c++

My code here is Find the Value of sphere.                  Here the code     #include <stdio.h> int main() { int tw = 4, pi1= 22, pi2= 7, r; printf( "Enter the 'r' : " ); scanf( "%d" ,&r); float res = tw*pi1*r*r; float result = res/pi2; printf( "The Area of sphere is : %f" ,result); }

AMERICAN TO INDIAN

 A_I_J CREATIONS This app is work from AMERICAN $ TO INDIAN ₹ Converter app  This app show you how much price of a $ In ₹  USD $       INR₹         1$    =      71.75₹ Download for free Download and install and enjoy this app is so helpful  To you know $ to ₹