Q&A Discussions
Why this code has no output?
0 Votes
1 AnswerArray Help
0 Votes
1 Answer 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 Votes
2 AnswersLanguages & Sizes
0 Votes
2 AnswersDIFFERENT TYPE
0 Votes
1 AnswerWhen 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 Votes
4 AnswersIs 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 Votes
5 Answersa)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 Votes
2 AnswersChallenge ...
-2 Votes
1 Answernon unique elements list
0 Votes
1 AnswerWhen 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 Votes
2 AnswersHot today
Sticky position
2 Votes
Help please?
3 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
Game development
0 Votes
SQL practice
2 Votes
Ruby programming?
3 Votes