- Upvotes Received
- 3
- Posts with Upvotes
- 2
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
- Interests
- programming, watching animie, PC gamming.
10 Posted Topics
[CODE]#include <iostream> using namespace std; int main() { int a,b,c, ope; cout<<"enter a value" << endl; cin >> a; cout<<"enter b value" <<endl; cin >> b; cout<<"enter operation (+ - * / and %)"; cin>> ope; if (ope == +) { c=a+b; cout<< c; break; } if (ope == -) … | |
| |
can some please explain what are command line parameters ? i read many books, read online didn't understand anything on what they are and when or how to use them. :( | |
write a program to accept the salaries of 10 employees from the user and display them in descending order for all the employees,if the user enters zero, the program should display the message"the amount should be greater than zero" and accept the value again. [CODE]#include <iostream> using namespace std; class … | |
create a menu driven application that accepts the salaries for ten employees and display the following information: 1)max salary 2)min salary 3)avg salary 4)number of employees whos salary is greater than 1000 5)the salaries in ascending and descending orders. [CODE]#include <iostream> using namespace std; class Max { int marks[10]; public: … | |
i am trying to write a program for friend functions but it isnt working. :( [CODE] #include <iostream> using namespace std; class Z; { private: int a; friend void fn(); }; void fn() { Z one; one.a=5; cout<<a<<endl; } int main() { fn(); return 0; }[/CODE] can someone please tell … | |
[CODE]#include <iostream> using namespace std; class Reverse { int n,num,dig,rev; public: void Rev() { cout<<"enter an integer number to check if it palindrome or not \t"; cin>>num; n=num; // rev=0; while(num>0) { dig=num%10; // 48%10=4 rev= rev*10+dig; // rev=48*10+4=484 num=num/10; //484/10 =48 cout<<num; } if (n==rev) cout<<"given number is palindrome"; … | |
[CODE]#include <iostream> using namespace std; class LoopEx { int x,y; public: void Ex; { x=3; y=x; // y=3 while(y<=1) // 3<=1 y--; // 3, 2 x=x*y; // x= 3*3=9 cout<<x; } }; int main() { LoopEx F; F.LoopEx(); return 0; } [/CODE] im trying to write a program for factorial … | |
can some one please explain what is static variable, i tried reading some books, tried googling but i am not able to understand what are its uses. [QUOTE]a static variable retain their value even after the function to which it belongs is executed.[/QUOTE] i am not understanding what is meant … | |
i am trying to print multiplication table by using for loop but it is showing only the last one instead of displaying all. :( [CODE]#include <iostream> using namespace std; int main() { int i,j, k; cout<< "enter i value"; cin>> i; for(j=0;j<20;j++) k=i*j; cout<< k <<endl; return 0; } [/CODE] |
The End.