I NEED HELP WITH THE FLOWCHART AND PSEUDOCODES OF THIS PROGRAM PLEASE!
Output screen of given program:
main function flowchart
c.(1) flow chart of f1()
flow chart of f2()
pseudocode of main, f1() and f2()
Function Main
Declare Integer f1result
Output "Calling f1() ..."
Assign f1result = f1(7,8)
Output "f1Result = " & f1result
End
Function f1 (Integer a, Integer b)
Declare Integer data
Output "In f1() :a= "&a &"b="&b
Assign data = -1
If a>b
Assign data = a-b
End
Return Integer f2(data)
Function f2 (Integer data)
Declare Integer result
Output "In f2() : data is " & data
Assign result = data-5
Return Integer result
I NEED HELP WITH THE FLOWCHART AND PSEUDOCODES OF THIS PROGRAM PLEASE! +3) (5 pts) Show...
Could you please provide a detailed step by step explanation as to how I should go about obtaining the output shown for each program fragment. Thanks. a) int f1 (int x) { int y=3; printf("%d%d",x,y); return x++; } int main (void) { int y=6, x=4; printf("%d\n",f1(y)); printf("%d%d\n",x,y); return 0; } OUTPUT: x=6, y=36 x=4, y=6 b) void f2(int n, int a[]) { for (int i=0;i<n;i++) a[i] += a[i+1]; } int main() { int A[]={1,2,3,3,4,5};int i, N=6; for (i=0;i<N;i++) printf("%d ",A[i]);...
C++ HELP I need help with this program. I have done and compiled this program in a single file called bill.cpp. It works fine. I am using printf and scanf. Instead of printf and scanf use cin and cout to make the program run. after this please split this program in three files 1. bill.h = contains the class program with methods and variables eg of class file class bill { } 2. bill.cpp = contains the functions from class...
5. (7 pts) What wil display on the output screen after following program is executed? includeciostream using namespace std int b 40 int A function(int a) int main (void) int c 7, b 15 cout<cA function (e) <cendla return 6 int A function (int a) int i cout<<b<<endl; if (a>-0) else return i i-ai i--ai Ans5 6. (7 pts) Show what will appear on the output screen after the following program is executed tincludeciostream> using namespace std; void A function...
6) Show the output of the following program. You mus trace the code to show how you reached the answer. (5 points) #include <stdio.h> int x 18; int y = 5; int z ·e; void my first function) void my_second_function); int main() int ys y = x; if (z) my_first functionO else my-second-function(); x++ : if (z) my_first_function(); else my_second_function(); return e; void my_first_function) x+y); is %d\n", printf("The value of x+y in my-first-function() void my_second_function) ( x=100; is %d\n", x);...
PLEASE HELP ME WITH THIS TASK 3.1 (FLOWCHART) AND TASK 3.2 (SOURCE PROGRAM). THANK YOU! Given below is a partially completed C program, which you will use as a start to complete the given tasks. #define SIZE 9 #include <stdio.h> int compareAndCount (int[], int[]); double averageDifference (int[], int[]); void main() { } int compareAndCount(int arr1[SIZE], int arr2[SIZE]) { int count = 0; for (int i = 0; i < SIZE; i++) { if (arri[i] > arr2[i]) count++; } return count;...
C++ HELP I need help with this program. I have done and compiled this program in a single file called bill.cpp. It works fine. But I need to split this program in three files 1. bill.h = contains the class program with methods and variables 2. bill.cpp = contains the functions from class file 3. main.cpp = contains the main program. Please split this program into three files and make the program run. I have posted the code here. #include<iostream>...
PLEASE HELP ME WITH THIS TASK 3.1 (FLOWCHART) AND TASK 3.2 (SOURCE PROGRAM). THANK YOU! Hint: the number array in task 2 is work for task 3 in figure 1. Given below is a partially completed C program, which you will use as a start to complete the given tasks. #define SIZE 9 #include <stdio.h> int compareAndCount (int[], int[]); double averageDifference (int[], int[]); void main() { } int compareAndCount(int arr1[SIZE], int arr2[SIZE]) { int count = 0; for (int i...
I need to do object oriented programming for c++. I had to make make a program where it would add,subtract,multiply,and divide fraction. I got that working, but it wont work for negative can anyone fix it and explain how they did it? Source.cpp code: #include "Fraction.h" #include <iostream> using namespace std; int main() { Fraction f1(-4, 6); Fraction f2(5, -9); Fraction sum = sum.add(f1, f2); sum.print(sum); Fraction diff = diff.subtract(f1, f2); diff.print(diff); ...
Convert the C program into a C++ program.Replace all C input/output statements with C++ statements (cin, cout, cin.getline) . Re-make the func function by the following prototype: void func( double, double &); #include int user_interface(); double func(double); void print_table(); int main (int argc, char *argv[]) { print_table(user_interface()); return 0 ; } int user_interface(int val){ int input = 0; printf("This function takes in x and returns an output\n"); printf("Enter Maximum Number of X:"); scanf("%d", &input);...
I need help on this Systems review please! it's due by midnight monday. Question 1 Not yet answered Points out of 1.00 Flag question Question text Using these declarations: int * numberPointers[3]; int * pointer; int number; Which of the following statements would generate a warning or error? Select one: a. number = pointer; b. *pointer = number; c. pointer = numberPointers; d. numberPointers[2] = &number; e. a., b., and d. f. a. and c. Question 2 Not yet answered...