Tuesday, 8 April 2014

c++ program

14. Write a c++ program to find out sum of digit of given number.
15. Write a c++ program to add two numbers without using addition operator.

1.write c++ program input two numbers,swap the values and then display them 
2.write c++ program that inputs two numbers,swap these value without using third variable  
3. write c++ program which accept any array of 10 numbers and display on the screen

write c++ program which accept any array of 10 numbers and display on the screen


  1. #include<iostream.h>
  2. #include<conio.h>
  3. void main()
  4. {
  5. clrscr();
  6. int a[10];
  7. cout<<"enter numbers:\n";
  8. for(int i=0;i<10;i++)
  9. cin>>a[i];
  10. cout<<"number is array"<<endl;
  11. for(int j=0;j<10;j++)
  12. cout<<a[j];
  13. getch();
  14. }

Tuesday, 18 February 2014



  data type            Array    
   loops      pointer 

Wednesday, 5 February 2014