Skip to main content

Posts

C++: Write a program to print the largest of 3 number using conditional operator

Write a program to print the largest of 3 number using conditional operator #include<iostream> using namespace std; int main() {     int a, b, c;     cout << "Enter 3 no\n";     cin>>a>>b>>c;     int big =  ( a>b && a>c )?a:(b>c?b:c);     cout<<"\nAmong "<<a<<" , "<<b<<" , "<<c<<" Biggest is "<<big<<endl;     return 0; }

C++: Write a Program to Find the S.I given Principal = 100 , take rate and time from the User

Write a Program to find the S.I given Principal = 100 , take rate and time from the User #include<iostream> using namespace std; int main() {     int principle = 100;     int rate, time, intrest;     cout << "Enter rate= ";     cin>>rate;     cout<<"Enter time= ";     cin>>time;     intrest=(principle*time*rate)/100;     cout <<"The intrest rate is = "<<intrest<<endl; }

C++: Program to calculate and display area of a circle

C++: Program to calculate and display area of a circle #include <iostream> using namespace std; int main() {     float radius;     float area;     cout << "enter radius:";     cin >> radius;     area = radius * radius * 3.14;     cout << "area of the circle of is:" << area;     return 0; } Result -

C++ : squaring number in C++ script

C++ : squaring number in C++ script #include <iostream> #include <stdlib.h> using namespace std; int main() {   ("cls");    //For clearscreen funtion for Turbo C++ version clscr() also work     int var, sqrs;     cout << "enter varible:";     cin >> var;     sqrs = var * var;     cout << "\n" << "The square is :" << sqrs; return 0; } Result - https://code.sololearn.com/c45mw9pXGOUs/#cpp Use this script from here

C++ : Cascading of I/O Operators

C++ : Cascading of I/O Operators  Successive occurrence of operators (">>" or "<<" respectively) can be concatenated    example 1 - cout << "The sum of 2 + 5 = " << 2 +5 \n"; example 2 - cout >> "The result of 8 - 2 is" << 8 -2; example 3 - cout << "the sum of" <<  value1 << "and" << "is" << value 1 + value2 << "\n"; example 4 - Similarly successive occurrences of input operator (>>) can also be concatenated as follows :  cout << " Enter two numbers :"; cin >> value1 >> value2; Demo - ( squaring numbers) #include <iostream> using namespace std; int main() {     int var, sqrs; cout << "enter number:\n"; cin >> var; sqrs = var * var; cout << "\nanswers\n" << sqrs << endl; } Result - Without Cascading - ...

How To Setup Instabot

How To Setup Instabot 1> Fire up terminal apt-get update apt-get dist-upgrade apt-get install apt apt install git 2> git clone https://github.com/instagrambot/instabot.git  copy downloaded (instabot) folder in new folder on Desktop (my folder name is Instagram) Now Go To Desktop>Instagram>instabot>instabo>api Method 1> Fire up terminal from this folder (click right mouse button & choose Open In Terminal ) Method 2> use this terminal command cd Desktop/instagram/instabot/instabot/api steps 3> now run this command   git clone https://github.com/instagrambot/api.git step 4> c opy all the file of the api which is downloaded from (git clone https://github.com/instagrambot/api.git) from this command and paste this outside the box(Desktop>Instagram>instabot>instabot>api)  and delete downloaded api folder.......... example :-   steps 5> Go T o Desktop>insta...

How To Install Adobe Flash Player In firefox quantum/firefox on Kali Linux

I n this article we are going to install and plugin adobe - Flash player on Firefox Quantum /firefox so first you should must download firefox quantum in kali linux here is the steps to install firefox quantum in kali linux 2017.2 - How To Install Firefox Quantum in Kali linux /other Linux    Method -1: Automatic Install Open a Terminal in Kali Linux and type this command: apt-get install flashplugin-nonfree When it finishes installing and you are presented with the root@kali prefix again, type this command and press Enter: update-flashplugin-nonfree –install You can go here in firefox to test Flash Player. If you see the little animation , then you’re good to go!   Method #2: Manual Install   First of all go to this site and download tar.gz for other linux . https://get.adobe.com/flashplayer/ Now hit the download button Extract the tar.gz File once you have downloaded the file extract them. Installing Fla...

How to install TeamViewer on Debian/Ubuntu/Kali Linux

  About TermViewer: T eamViewer is a proprietary computer software package for remote control, desktop sharing, online meetings, web conferencing and file transfer between computers. Features TeamViewer is available for Microsoft Windows, Mac OS X, (Ubuntu, Mint, Kali, etc).Linux,Chrome OS,iOS, Android, Windows RT, Windows Phone 8 and BlackBerry operating systems. It is also possible to access a machine running TeamViewer with a web browser. While the main focus of the application is remote control of computers, collaboration and presentation features are included. TeamViewer can be used without charge by non-commercial users, and Business, Premium and Corporate versions are available. TeamViewer GmbH was founded in 2005 in Göppingen, Germany. UK-based private equity firm Permira acquired TeamViewer GmbH from Durham, North Carolina-based software developer GFI Software in 2014. The company also hosts an online backup cloud service called Airbackup. Security...

How To Install Firefox Quantum in Kali linux /other Linux

T H e latest version of Mozilla’s web browser Firefox is called Quantum because it’s blazing fast. It has been coded in Rust instead of the usual C++ and it is the first web browser to truly utilize the power of a multi-core processor . Because of these changes, Mozilla claims that Firefox is two times faster and takes 30% less power than its previous release. by RoCk StAr DeViL Installing Firefox Quantum in Kali Linux and other Linux    1. download tar file of firefox Quantum from Here :- download it from the official website: Download Firefox Quantum   2.   Extract the downloaded file and look for an executable called Firefox. If you have an older version of Firefox running, stop it.    open terminal at extracted dir of firefox Quantum and open terminal from there and use this command -    ./firefox example - root@kali:~/Documents/g/firefox-57.0/firefox# ls ro...