I assumed tat u have include the neccessary header files *.h.
This is the correct format ------ scanf("%d",&k); <====Take note of the brackets and the semi-colon.
Type: Posts; User: cc870
I assumed tat u have include the neccessary header files *.h.
This is the correct format ------ scanf("%d",&k); <====Take note of the brackets and the semi-colon.
O.... ic... tks quzah...
Maybe the follow steps can hlp u ^.^
1) Find out the requirements/limitation for the program u r goin to do
2) Visual how the output is going to be
3) Program it.
Actually, the program does not close on 3rd scanf.... The program calculate N output the answers. It is juz tat u dun have a line to "hold" the screen.
printf("For series wiring: %.3f\n",...
Maybe this is the intented program?
Take note of the following in future programming
1) if u are using "float" to declare ur variables, use "%f" to scan in ur data.
2) if u are using...
But since you are using a do-while loop, it is suppose to loop back to the menu.
// Description: Calculates the number of jelly beans in a container.
#include <stdio.h>
#define PI 3.14159265
int main()
{
// Declare necessary variables
double jb_radius, conta_radius,...
I thank Quzah for the feedback to my previous reply...
I have misunstood that the problem is caused by '\n' left in stdin, therefore i use gets to get '\n' into dump...
Is '\n' considered 1...
Wif ref. to 1st program, declare a char array of 1 and use gets to store '\n' in it.
In ur first scanf statement, should be scanf("%d", &cd_space);
after the scanf statements, use gets to store...
/*
This source file is for current calculation using
voltage/resistance.
*/
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
//Function prototype
//char UserChoice(void);
Is it possible to display superscript/subscript chars using C programming?
I am using wins XP and Visual C++.
Thanx in advance.....
Solve my problem le.....
a BIG TKS to everyobe who help me.....
I am using Visual C++ 6.0
My OS wins XP
Hi!!!!
How can i change the colour of the screen when my program runs? (EG: from BLACK to RED);
PLS help. tks...
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
void main(void)
{
//Declaration
double v_a,v_b,v_c,discriminant,root_1,root_2,sq_d;