Posts

Showing posts from November 18, 2018

MASTER PATTERNS

Image
PROGRAMS #include<iostream> using namespace std; int square(); int rectangle(); int triangle(); int diamond(); char choice(); int main() { int a; cout<<"Enter your choice\n1 for Square\n2 for Rectangle\n3 for triangle\n4 for diamond"; cin>>a; if(a==1) square(); else if(a==2) rectangle(); else if(a==3) triangle(); else if(a==4) diamond(); } int square() { int size;     cout << "\n\n Print a pattern like square with # character:\n";     cout << "--------------------------------------------------\n";     cout << " Input the number of characters for a side: ";     cin >> size;     for (int row = 1; row <= size; ++row)      {         for (int col = 1; col <= size; ++col)          {             cout << "* ";   ...

C++ ONLINE SHOPING STORE

Image
Program #include<iostream> using namespace std; int main() { cout<<"\t\tWELLCOME TO CYCLE ONLINE SHOPING"<<endl; cout<<"price of bicycle is 20.5$ \nprice of motorcycle is 50.5$"<<endl; int phone,e,u,r,j; string name,address,email,i; float q=20.5,k=50.5,bill; cout<<"Name:"; cin>>name; cout<<"Phone:"; cin>>phone; cout<<"Address:"; cin>>address; cout<<"Email:"; cin>>email; cout<<"Type of cycle\n1 for bicycle\n0 for motorcycle:"; cin>>e; cout<<"Item Quantity:"; cin>>u; if(e==1) cout<<"Bill="<<q*u<<endl; else if(e==0) cout<<"Bill="<<k*u<<endl; else { cout<<"Wrong input"; } cout<<"\nDo you follow the methord of COD(Cush on delivery)\n1 for Yes\n0 for no:...