I'm not sure, I'm guessing counting sheeps.
It's pretty late bud.
Type: Posts; User: iamtazb
I'm not sure, I'm guessing counting sheeps.
It's pretty late bud.
There is what my paper looks like:
imgur: the simple image sharer
#include <stdio.h>
int main(int argc, const char * argv[])
{
int stud_num, section, std_section, last_section;
float cost_factor;
Sorry realized its a & not a % - typo.
Oh thats where the problem is, can you give me an example of how to prototype,
void get_expenses(double* pSchool, double* pLiving, double* pTransp,...
Hello guys!
Okay so I'm making a student budget program for class its a basic program using functions and pointers. Here is the template they want us to start with:
main() {
float school,...
#include <stdio.h>
int main (int argc, const char * argv[])
{
int location, vehicle, weekday, peak, km, days;
Hmm yeah that fixed it? I guess it was the spacing? Grammar? o_O
This is what I'm getting:
~/c_programming> ./km
Enter number of KMs driven:
1000
Extra KM: -0.00
---
Basically I want it so if its over 100 KM that it gets charged 0.50cent/KM minus the...
thanks fix those problems. can you please tell me why this is not computing correctly?
printf("Enter number of KMs driven:\n");
scanf("%d", &km);
if (km>100){
...
#include <stdio.h>
int main (int argc, const char * argv[])
{
int location, vehicle, weekday, peak, km, days;
float price, insurance;
printf("Please choose a location(1:...
perfect!
Great thanks for the tip.
I have one little compiling error: What is wrong with this statement:
if (vehicle==1 && peak==1){
0.50*km+15=price;}
I'm making a car retal program for a friends new business, heres the deal:
He has 5 locations, 5 different type of cars in each, different pricing on all, and different price depending if rented...
Hey so I restarted and I used the suggestions (thanks)
I'm kind of stuck here:
#include <stdio.h>
main(void){
I restarted and I'm taking this approach basically:
Am I going at it the right way?
#include <stdio.h>
main(void){
I'm trying to write this program that does the following:
User has to input 10 numbers, but also has the option to stop.
then program should output the min/max/avg
#include <stdio.h>...
My prof never taught us to
a) declare main
b) add the stuff in the bracket
Is it beneficial to do it that way or just keep it at
main(){
Thanks for all the help guys! I cleaned up the code and will post an updated version in just a bit
here is my updated script with still the 2 errors:
#include <stdio.h>
#include <stdlib.h>
main()
{
Awesome got rid of 2/4 errors!
Now I'm getting
(??what is this) hw2.c: In function 'main':
(last line of the program) hw2.c:42: error: expected declaration or statement at end of input
I've been sitting here wondering what it is I'm forgetting and why it is NOT compiling for more than an hour, I've done it via pico and codepad
Can someone please help!
#include <stdio.h>...