15,551 Topics

Member Avatar for
Member Avatar for atman

Hello., I haveto check for non-numerci input, when reading numeric input. I know how to validate numeric input with while loop, but what if i need numeric input and user inputs alphabetic letter, any suggestions?? Thanx a lot! cheers!

Member Avatar for devnar
0
97
Member Avatar for atman

Hey guys! I'm trying to calculate the average for student marks using pretest loop, and for some reason i get the wrong result, even though the code looks proper to me., there are 7 questions all of them totaling 100%, i haveto return average mark i HAVETO use pretest loop. …

Member Avatar for Aia
0
143
Member Avatar for jhuyenh

hey guys, i posted a encoding/decoding thread a litle while ago. i've gotten some what far on it, but now i just don't know how to write the most important part. the actual decoding. i need to essentially cut the secret message numbers (22384) and only use the first two …

Member Avatar for jhuyenh
0
105
Member Avatar for BestJewSinceJC

Its basically telling me it doesn't know wth the pow() function is. But at the top of the file, I have #include<math.h> so shouldn't that work? And right after I have the #include, I declared the function definition of bintodec, so that isn't the problem either. [CODE]int bintodec(char* array){ int …

Member Avatar for BestJewSinceJC
0
112
Member Avatar for Superstar288

hi everyone just starting ansi c but i seem to be having problems i have to make a program which checks if the user input is uppercase,lowercase or digit which i have done but for some reason i cant seem to do character counts ive tried one way but it …

Member Avatar for Superstar288
0
113
Member Avatar for gunjanagrawal

U can find all the program in c.If du u have any query about c plz ask me and also program

Member Avatar for nucleon
-1
184
Member Avatar for blackslither

I had to implement Game of Life in a 3D matrix (int a[ ][ ][ ]) , but the complexity of my implementation is O(n^6) (6 imbricated for) and it runs very slow . Can anyone help me with an optimized version of Game of life , even with a …

Member Avatar for ArkM
0
88
Member Avatar for IrishUpstart

I am trying to write a program to find the integrals of a function, where the computer determines the number of slices that it should use, going through a loop until it finds the change small enought to ignore. I want it to have a tolerance of .01% Can anyone …

Member Avatar for devnar
0
102
Member Avatar for ajay.krish123

While entering the password and id in the program ,i want the program should not display any of those entered characters. While enter the password it should show the astericks for eg. ****** By using Scanf,it is not possible.. By using getpass() function it just doesn't display any thing on …

Member Avatar for ajay.krish123
0
106
Member Avatar for amvx86

Hello all, I've built a program which will take users data from the command line using int main (int argc, char *argv[]). However, when i wrote the program; i can successfully extract the options specified --php --html, etc. What i'm having a hard time with is writing the program to …

Member Avatar for WaltP
0
99
Member Avatar for henks

[code] #include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> int main(){ char input[10]; int i,j,digit,out[10],flag=0,sum; while(flag==0){ sum=0; flag=0; strcpy(input," "); scanf("%s",&input); fflush(stdin); digit=strlen(input); printf("%d\n",flag); if(strlen(input)>8){break;} /*else { for(i=0;i<8;i++){ if (input[i]!=48&&input[i]!=49){ flag++; break; } } }*/ printf("%d\n",digit); printf("%d",flag); if (flag==1){break;} for(i=0;i<8;i++){ if(input[i]!='\0'){ if(input[i]=='1'){ out[i]=1;} else if(input[i]=='0'){ out[i]=0;} } } j=1; for(i=0;i<digit;i++){ sum+=out[i]*pow(2,digit-j); j++; } printf("Decimal …

Member Avatar for henks
0
144
Member Avatar for ragaven

Hello friends............ How to check whether the given file path is valid or not in C,independent of OS......... Please reply immediately......... Thank you.........

Member Avatar for Ancient Dragon
0
334
Member Avatar for slimjimmer

Hi. I'm new to C, so I have probably made an elementary mistake in my code. I am trying to make a program for finding roots of a quadratic equation, using if and else, but first I'm trying to get used to using the sscanf function which I have never …

Member Avatar for slimjimmer
0
431
Member Avatar for ajay.krish123

plzz help i have to make a program in c in which the windows (output screen) to scroll up and down with mouse as require??? i have been searching for long time but didnt got any cluee??

Member Avatar for Ancient Dragon
1
250
Member Avatar for coolbuddy059

I'm writing a code for all the algorithm mention in cormen there are term DISK-READ and DISK-WRITE. Actually what the author want to say by using these terms.

Member Avatar for ArkM
0
138
Member Avatar for sharpst

I have got to create a simple calculator in a college level intro to c prog class, my calculator must be able to do division multiplication addition subtraction using whole numbers. Any ideas on what i should do? please help

Member Avatar for ajay.krish123
0
780
Member Avatar for scl84

Hi! I want to know if it is possible to display a binary tree using double linked list as follows: A / \ B C / \ / D E F I tried some possibilities but i think it is impossible since there are lots of parameters to take in …

Member Avatar for Prabakar
0
87
Member Avatar for jhuyenh

Hi, i'm very new here and very new to C. I'm trying to figure out how to encode and decode in my C class. i was given a two txt files to use. one is the decoding symbols and the other are the codes i need to decode. i started …

Member Avatar for ajay.krish123
0
418
Member Avatar for atman

Hello, Im taking C in school, and i have a problem with my code, nothing happens at all when i run the program. The task is: A program is required that prompts the user for a number. The program will then print a series of asterisks to represent the number. …

Member Avatar for Aia
0
168
Member Avatar for thanatosys

First here is my header file [code=c] /* @source Simplespell Program * * @author: Chris King(cpking@ncsu.edu) * @@ * * node.h * CSC 230 Fall 2008 * * The @ signs along with the word denote specific information about * the program. Using the standards described in: * http://emboss.sourceforge.net/developers/c-standards_new.html */ …

Member Avatar for Aia
0
273
Member Avatar for atman

Hello., I'm working on my school assignment and the condition is to use post-test loop trying to get following result: --------------------------------------------------------------- Enter the Section Code: 0 Invalid value entered. Must be 1 to 4, please re-enter: 1 Enter the Student's ID: --------------------------------------------------------------- this is the assignment condition: When the program …

Member Avatar for Aia
0
235
Member Avatar for yuvaraj.tr

Hi friends i am new to embedded domain. I would like to learn embedded C ,.. Where i get free books to learn embedded C.......... and whre i get free compilers to execute embedded c programms.......... I am using linux os.............. please help me................. Advance Thanks for helping

Member Avatar for yuvaraj.tr
0
62
Member Avatar for yinfu89

Sorry , Newbie here i have no clue on how to do "Write a complete C program to read twenty (20) integer numbers. Then count and display the number of even and odd numbers among the twenty (20) integers read. Use a while loop to perform the repetition task." is …

Member Avatar for ddanbe
0
131
Member Avatar for paynegm

So i need to use scanf() to get input of positive ints from the user and then print the number out and then ask again and keep doing this till the user enters a negative number. with what i have it prompts the user to enter a number then prints …

Member Avatar for Dave Sinkula
0
41
Member Avatar for ahfan_85

I hv This Question here: User will be prompt for number of quiz that has been taken. User has to input their marks for each quiz. Your program will calculate the average of the marks. Find the lowest mark of those quizzes. Find the 3 highest mark of those quizzes. …

Member Avatar for ahfan_85
0
293
Member Avatar for manjuptm

Hi, i want to store a hex values 01 00 A8 E3 56 E1 into a byte array and send it through socket can anyone suggest a way to store this thanks,

Member Avatar for Narue
0
70
Member Avatar for kyeong

Use the given void function. This function will find the flight whose departure time is closest to desired_time(expressed in minutes since midnight). It will store the departure and arrival times of this flight (minutes also) in the variables pointed to by departure_time and arrival_time, respectively. Here's what I've gotten so …

Member Avatar for devnar
0
148
Member Avatar for happy8899

Can anyone show me how to solve the 8 puzzles either using the heuristic search thank you. if u can , u may attach the sourcecode too. thank u :cheesy:

Member Avatar for ahyeek
-1
171
Member Avatar for rock_climbr

Hey everyone, I'm currently trying to use LabVIEW for pattern recognition to find the angle of a product using one version of the hough transform for circles. I'm having a problem and I'll do my best to explain it. I have my code working for all test images (or at …

Member Avatar for ArkM
0
108
Member Avatar for kidd218

This is about the arrays...I thought a lot...but I couldn't get any ideas from that...please help me.. thanks!! the question: A series of numbers can be read from the keyboard and put into an array of integers. You will then need to call a function to invert the values (1/x) …

Member Avatar for Aia
0
120

The End.