Posts

Showing posts from September, 2015

Root-Description

Image
Root-Oveview If you haven't heard of root, you were probably living in the Gotham City fighting evil. But still for newbies, it is a way to explore the limits of  your android. Effects When you root your android, a superuser app is installed on your device. The installation of superuser requires special system rights which makes the rooting process a little complex. Superuser will behave like system apps and can't be uninstalled like system apps through standard procedure. Is it illegal? Rooting is completely legal. But voids your warranty, that's the only problem. But a rooted phone can also be unrooted until there is no hardware damage. To benefit from your warranty and root your android, just unroot it before turning it into customer care. Advantages Rooting gives you many rights that the developers of your device are not willing to give it to you. Trust me, rooting brings you one step closer to becoming a developer.

Program that asks for hour the trip started and the hour the trip ended and the distance traveled. Then outputs the average speed of the trip.

#include<iostream.h> void main() { int h1,h2,h,t; float s,d; cout<<"Enter starting time"; cin>>h1; cout<<"Enter ending time"; cin>>h2; h=h2-h1; if (h<0) {    t=h+24;   } else   {     t=h;    } cout<<"\nEnter Distance"; cin>>d; s=d/t; cout<<"Average speed= "<<s; }

Program that asks for height in inches and prints it in centimetres.

#include<iostream.h> void main () { float h; cout<<"Enter height"; cin>>h; h=h*2.54; cout<<"\nheight in cm= "<<h; }

Program that asks for length and breadth then prints area.

#include<iostream.h> void main() { float l,b,ar; cout<<"Enter length "; cin>>l; cout<<" \nEnter breadth"; cin>>b; ar=l*b; cout<<"\narea="<<ar; }

Write a C++ program to swap two variables.

#include<iostream.h> void main () { int a,b; cout<<"enter two variables"; cin>>a>>b; a=a+b; b=a-b; a=a-b; cout<<a<<b; }

Write a program to print the following pattern

Image
#include<iostream.h> void main () { for ( int i=1; i<=5;i++) {    for ( int j=1;j<=i;j++)      {         cout<<j;       }    cout<<'\n'; } }