12 Nov 2009

Play With Value

0 comments



Hello guys, today let's playing with number/value

/* Let's Play with Value*/

#include <iostream.h>

#include <conio.h>

void main()

{

int x, y, z;

cout<<"Value PlayongI"<<endl;

cout<<"Input First Number= ";

cin>>x;

cout<<"Input 2nd Number = ";

cin>>y;

cout<<"Input 3th = ";

cin>>z;

cout<<"View Result = "<<endl;

cout<<z<<"\n"<<y<<"\n"<<x;

getch(); }

Lagest Number

0 comments

How to search largest number???



#include <iostream.h>

#include <conio.h>

void main ()

{

int a, b, c, d;

cout<<"Insert First Number!!! ";cin>>a;

cout<<"2nd Number ";cin>>b;

cout<<"3th Number ";cin>>c;

cout<<"4th Number ";cin>>d;

if (a>=b&&a>=c&&a>=d)

    {

cout<<"Largest num is "<<a;

}

else if (b>=a&&b>=c&&b>=d)

    {

cout<<"Largest num is"<<b;

}

else if (c>=a&&c>=b&&c>=d)

    {

cout<<"Largest num is"<<c;

}

else

{

cout<<"Largest num isr"<<d;

}

getch();

}

8 Nov 2009

Convert Day

0 comments

Welcome back friend!!! Today, I will write a C++ language program for convert day. How to make that program??? Please read more to view source code "convert day program"!!!

/* Convert Day */


#include <iostream.h>

#include <conio.h>


void main()

{

int xday, year, month, day;


cout<<"CONVERT DAY"<<endl;

cout<<"Input Day =
";

cin>>xday;

year=xday/365;

month=(xday-(year*365))/30;

day=xday-(year*365)-(month*30);

cout<<"Convert day =
"<<year<<" year; "<<month<<"
month; "<<day<<"
day.";


getch();

}

Get back to this site Friend!!!



Good luck

5 Nov 2009

LARGE OVAL

0 comments
Today, I want you to make a program computer for "compute" large of oval. Save it with Task1.cpp


/* Task 1 */

#include <iostream.h>

#include <conio.h>

void main()

{

cout<<"OVAL LARGE"<<endl;

float r, large;

const float phi=3.14;

cout<<"Input r = ";

cin>>r;

large=phi*r*r;

cout<<"Large is "<<large;

getch();

}

3 Nov 2009

Convert From Second To Hour And Minutes

0 comments

Hi guys, let's learn C++ language online again. Now, I want to give you a program code to convert from second to hour and minutes. (click this picture to zoom)

#include <iostream.h>

#include <conio.h>

int main()

{

int input;

int hour;

int minute;

int second;

cout<<"Please input second";cin>>input;

hour = input/3600;

minute = input % 3600/60;

second =input %3600 % 60;

cout<<"\nHour total is ="<<hour;

cout<<"\nMinute total is ="<<minute;

cout<<"\nsecond total is ="<<second;

getch();

}

Join this blog if you want to get more leason!!!

2 Nov 2009

Make Your First Program with C++

0 comments
Welcome to C++ Language Learning!!!

Are you want to learn about C++???

OK. Follow this blog!!

How to make your first program??? Learn with me!!! (Please use Borland C++ Compile!!!)



#include <iostream.h>

#include <conio.h>

void main()

{

    char name[21];

cout<<"Hallo, What is your name?"; cin>>name; cout<<"Nice to meet you
"<<name<<endl;

getch();

}



To see your first program, press Ctrl+F9 button

Learn C++ Tools

0 comments
Welcome to Cpluslearning.blogspot.com. If you want learn C++ language, please always read this blog every day to update.

Tools:

1. Computer

2. Borland C++

Yes, you just need two tools to learn C++ language online

Enjoy
 

C++ Language Learning Design by Insight © 2009