10 Topics

Member Avatar for
Member Avatar for utkarshsahu

I wrote a simple program to take input till the char array is filled up. But i seem to be getting a problem during runtime that the program takes input continuously and never stops. Pls help in identifying the problem.(there were no errors during compiling) [CODE] #include<iostream> #include<string> using namespace …

Member Avatar for Laiq Ahmed
0
162
Member Avatar for infamous5

Hello, I am a beginner at programming and I am having some trouble finding the error in my code(pasted below). I am first trying to come up with a (1) function to evaluate integers at a given power.(2) A function to check if an integer is a perfect number. I …

0
137
Member Avatar for George_91

I've this code. I need to do several experiments to obtain de average time it takes to do some methods. Instead of re-running and re-running the program, I want to put a segment of the code in a FOR bucle. The problem is that my program never ends,it stays looping …

Member Avatar for vishwanath.m
0
165
Member Avatar for ilovejava

so this is the assignment Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). If d(a) = b and d(b) = a, where a b, then a and b are an amicable pair and each of a and …

Member Avatar for Taywin
0
670
Member Avatar for delbari

this method return "[B]StackOverflowException[/B]" error for some inputs;like "12" where is Infinite loop point? [CODE] public void cycle(int f){ int i, j; if (f == 0) return; else { for (i = f; i >= 0; i--) { for (j = 0; j <= 10; j++) { if (i == …

Member Avatar for delbari
0
203
Member Avatar for vineeth vs

pls any one tell me why the loop is not ending?? (program for quick sort)[CODE][/CODE] [CODE]#include<stdio.h> int partition(int a[],int l,int r); void quicksort(int a[],int low,int high); int loc,temp,pivot,a[50],low,high,left,right; int main() { int n,i; printf("\nEnter the no: of elements : " ); scanf("%d",&n); printf("\nEnter the numbers : "); for(i=0;i<n;i++) { printf(" …

Member Avatar for Narue
0
244
Member Avatar for beejay321

[CODE]int userChoice(){ int choice; cin>> choice; while (choice!=1 && choice!=2){ cout<<"that is not a valid choice please choose again "; cin>>choice;} return choice; }[/CODE] the whole point of this is that if a user doesnt enter 1 or 2 then it tells them to enter 1 or 2 and wont …

Member Avatar for Crutoy
0
234
Member Avatar for ziyakhan10

the program runs successfully but the final output comes out in the form of an infinite loop...please help [CODE] #include<iostream.h> #include<fstream.h> #include<conio.h> #include<stdio.h> struct emp { int eno; char name[20],desig[20]; float sal; }e; void main() { clrscr(); ofstream f1; f1.open("emp.dat",ios::app|ios::binary); char ch='y'; while(f1) { if(ch=='y'||ch=='Y') { cout<<"Enter the name"<<endl; gets(e.desig); …

Member Avatar for ziyakhan10
0
187
Member Avatar for Mr. Blank

Hi I'm currently stuck in an infinite loop because of the code I've written and i can't stop the code, close excel etc. Basically the code runs after a cell change, displays a msgbox and then causes itself to run again, and while this is happening i can't do anything …

Member Avatar for tipsen
0
221
Member Avatar for sftwr21

I'm a noob when it comes to C programming. I wrote a simple program that runs an infinite for loop. But inside that loop I wanted to create another loop to stop the user three times after entering incorrect passwords. I tested from different angles it seems like the infinite …

Member Avatar for sftwr21
0
211

The End.