Discussions Q&R
Array
0 Vote
2 RéponsesArray Help
0 Vote
1 RéponseChallenge
2 Votes
2 Réponses Write a C++ program that retrieves all the numbers stored in a data file named LAB1.TXT. As each number is retrieved, it is displayed on the screen. After the end of file is reached, the numbers should be sorted into numerical order and then the result should be displayed
EXAMPLE: Assuming LAB1.TXT has the following numbers: 7 4 12 3 The output would be Original order:7 4 12 3Numerical order:3 4 7 12
0 Vote
2 RéponsesLanguages & Sizes
0 Vote
2 RéponsesDIFFERENT TYPE
0 Vote
1 RéponseWhen I enter two numbers the sum is displayed.. but when I input character as yes not y... Then it goes into an infinite loop... can anyone explain why?
int a,b;
char ch;
do
{
cout<<"Enter two numbers: ";
cin>>a>>b;
cout<<"The sum is "<<a+b
<<"\nDo you want to try again (y/n): ";
cin>>ch;
}while(ch=='Y'||ch=='y');
0 Vote
4 RéponsesIs it possible to make my code run without having to press Enter on my IDE? For example: if I'm making a calculator and I want the calculations to be made as soon as I press "=" after typing the numbers and the operator?
Say I wanted to add two numbers: can it calculate automatically as soon as I write "2+3=" without having to press Enter?
0 Vote
5 Réponsesa)Write a function ‘rev’ which returns the reverse of the given integer. Function isPalin takes an integer as argument and checks whether it is palindrome or not using rev function. Using isPalin write a main function to accept n integers and display number of palindrome numbers found.
b)write a program to find the possible permutations of the given word .
0 Vote
2 RéponsesChallenge ...
-2 Votes
1 RéponseWhen I enter two numbers the sum comes.. but when I input character as yes not y... Then it goes into an infinite loop... can anyone explain why?
int a,b;
char ch;
do
{
cout<<"Enter two numbers: ";
cin>>a>>b;
cout<<"The sum is "<<a+b
<<"\nDo you want to try again (y/n): ";
cin>>ch;
}while(ch=='Y'||ch=='y');
0 Vote
2 RéponsesAujourd'hui en vedette
Sticky position
3 Votes
Help please?
3 Votes
Ejercicio Pytho
0 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes