You Are Reading

0

C++ Lecture: 2

Unknown Saturday 7 July 2012 ,


Q) Write a program to display Numerals (1 to 10) in words

Ans:
    
Code:

#include <iostream>
#include <conio.h>
using namespace std;
int main (int argc, char *argv[])
{
       cout <<"One"<<endl;
       cout <<"Two"<<endl;
       cout <<"Three"<<endl;
       cout <<"Four"<<endl;    
       cout <<"Five"<<endl;   
       cout <<"Six"<<endl;
       cout <<"Seven"<<endl;
       cout <<"Eight"<<endl;
       cout <<"Nine"<<endl;
       cout <<"Ten"<<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++