Dyskusje Q&A
Array
0 głosów
2 odpowiedziWhy this code has no output?
0 głosów
1 OdpowiedźArray Help
0 głosów
1 OdpowiedźChallenge
2 głosów
2 odpowiedzi 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 głosów
2 odpowiedziLanguages & Sizes
0 głosów
2 odpowiedziDIFFERENT TYPE
0 głosów
1 OdpowiedźWhen 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 głosów
4 odpowiedziIs 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 głosów
5 odpowiedzia)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 głosów
2 odpowiedzimy_sort
0 głosów
1 OdpowiedźChallenge ...
-2 głosów
1 Odpowiedźnon unique elements list
0 głosów
1 OdpowiedźWhen 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 głosów
2 odpowiedziPopularne dzisiaj
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
SQL practice
2 Votes