Question: C programming 1- question 2- is my code what I want is to edit my code so it can be compiled Problem A: Write a

C programming

1- question

2- is my code

what I want is to edit my code so it can be compiled

Problem A: Write a function that has one integer parameter and returns 1 if the given argument is a multiple of 3 and 0 otherwise. Write a main program that tests your function with enough test cases to give you confidence in the correctness of your function. Use assertions and, optionally, calls to printf. The function prototype should be

int multipleof3(int n);

Hint: what does the % operator do?

Remember that the semicolon at the end of the prototype should not be copied in your solution. All code that you turn in should compile and run without errors or warnings to earn you full credit.

#include #include

//1 true 0 false int multipleof3(int n){ int 3, int 16, int 18

multipleof3 =n/3

{ if(n%3==0) return 1; else if(n%3!=0) return 0; }

int main(){ int val=multipleof3(35); assert(val==0); return 0;

C programming 1- question 2- is my code what I want is

emacs24@vm-for-1310 File Edit Options Buffers Tools Compile Help #include #include //1 true false int multipleof3(int n){ int 3, int 16, int 18 multiplef3 =n/3 if(n%3-0) return 1; else if(n%31-0) retu rn ; C/L Abbrev) -multipleof3.c Top L15 -*- mode: compilation; default-directory: " Compilation started at Thu Feb 1 19:17:16 gcc -Wall -Wextra -g -o multipleof3 multipleof3.c /bin/bash: -g: invalid option Usage: /bin/bash [GNU long option] [option] /bin/bash [GNU long option] [option] script-file GNU long options: - -debug --debugger --dump-po-strings - -dump-strings -help --init-file -login - -noediting U:%*- *compilation* opL8 (Compilation:exit [2]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!