You Are Reading

0

C++ Lecture: 3

Unknown Saturday 7 July 2012 ,

Lecture: 3

Q) Write a program that display table of two
Code:
#include <iostream>
#include <conio.h>
using namespace std;
int main (int argc, char *argv[])
{
       cout <<"2 * 1 = 2 "<<endl;
       cout <<"2 * 2 = 4"<<endl;
       cout <<"2 * 3 = 6"<<endl;
       cout <<"2 * 4 = 8"<<endl;    
       cout <<"2 * 5 = 10"<<endl;   
       cout <<"2 * 6 = 12"<<endl;
       cout <<"2 * 7 = 14"<<endl;
       cout <<"2 * 8 = 16"<<endl;
       cout <<"2 * 9 = 18"<<endl;
       cout <<"2 * 10 = 20"<<endl;
       getch();
       return 0;
}
Code view in dev compiler:

Compile the program Ctrl+F9
       Run program Ctrl+F10

0 comments:

Post a Comment

 
Copyright 2010 Learn Dev C++