answersLogoWhite

0

To determine the value of the variable num1 after executing the pseudocode, I would need to see the specific pseudocode you are referring to. Please provide the pseudocode so I can analyze it and give you the correct value of num1.

User Avatar

AnswerBot

10mo ago

What else can I help you with?

Continue Learning about Math & Arithmetic

How do you determine the largest of 3 numbersi in pseudocode?

To determine the largest of three numbers in pseudocode, you can use the following logic: if (num1 >= num2) and (num1 >= num3) then largest = num1 else if (num2 >= num1) and (num2 >= num3) then largest = num2 else largest = num3 This structure checks each number against the others and assigns the largest value to the variable largest.


How to Write a psuedocode algorithm to read in three numbers and print the highest and lowest number?

read num1 read num2 sum = num1 num2 print highest value


Which is the code to multiply a number num1 by 2 using bitwise operator in c?

num1 <<= 1; /* shift left */


Write a program in c plus plus language to add 2 numbers?

int main() { int num1; int num2; int result = num1 + num2; return 0; }


How do you find the minimum and the maximum of a function?

'*** PROGRAM: Compare 2 numbers using both min/max functions; ' then, output which number is max/and, which is min. '*** declare variables... min = 0 max = 0 number1 = 342 number2 = 256 '*** main program... CLS '...(CL)ear the Output (S)creen PRINT "Minimum = "; findMin(number1, number2) PRINT "Maximum = "; findMax(number1, number2) END '...END of program/halt program code execution FUNCTION findMax (num1, num2) answer = 0 IF num1 > num2 THEN answer = num1 ELSE answer = num2 findMax = answer END FUNCTION FUNCTION findMin (num1, num2) answer = 0 IF num1 < num2 THEN answer = num1 ELSE answer = num2 findMin = answer END FUNCTION ---program output... Minimum: 256 Maximum: 342

Related Questions

How do you determine the largest of 3 numbersi in pseudocode?

To determine the largest of three numbers in pseudocode, you can use the following logic: if (num1 >= num2) and (num1 >= num3) then largest = num1 else if (num2 >= num1) and (num2 >= num3) then largest = num2 else largest = num3 This structure checks each number against the others and assigns the largest value to the variable largest.


How do you invoke function result () takes two float argument and returns an integer in c plus plus program?

You can do this by creating a forwarddeclaration of the function. You can call the forward drclared function inside the main to use it.int result(float num1, float num2);intmain(void){int value = result(3.14, 2.74);return (0);}intresult(float num1, float num2){int value = 0;// function codes goes here// you can alter the value of variable 'value'return (value);}The returning value of the 'result()' function is assigned to variable 'value' in 'main()'.


How to Write a psuedocode algorithm to read in three numbers and print the highest and lowest number?

read num1 read num2 sum = num1 num2 print highest value


C program to find addition of two long integer numbers?

#include<stdio.h> main() { long int num1, num2; long int sum=0; printf("Enter Value="); scanf("%ld", &num1); printf("Enter Value="); scanf("%ld", &num2); sum=num1+num2; printf("The Result is=%ld", sum); }


C program for swap two numbers without using temporary variables?

Using a temporary variable: #include<stdio.h> #include<conio.h> void main() { int a,b,temp; clrscr(): printf("Enter the first number a\n"); scanf("%d",&a); printf("Enter the second number b\n"); scanf("%d",&b); printf("Before swapping a=%d b=%d",a,b); temp=a; a=b; b=temp; printf("The swapped values are: a=%d b=%d",a,b); getch(); } Without using a temporary variable: #include<stdio.h> #include<conio.h> void main() { int a,b; clrscr(); printf("Enter the first number a\n"); scanf("%d",&a); printf("Enter the second number b\n"); scanf("%d",&b); printf("Before swapping a=%d b=%d",a,b); a=a+b; b=a-b; a=a-b; printf("The swapped values are: a=%d b=%d\n"); getch(); }


How do you divide two numbers using c program?

int num1 = 5; int num2 = 5; printf ("%d/%d=%d\n", num1, num2, num1/num2); and if you want to enter during the program then int num1; int num2; printf ("what is the first number?"); scanf ("%d", &num1); printf ("what is the second number?"); scanf ("%d", &num2); printf ("%d/%d=%d\n", num1, num2, num1/num2); i hope this helped


What is a variable in QBASIC?

Variables in Qbasic are divided into two groups. There are numerical variables and string variables. This is how you would use a numerical variable: CLS INPUT "Enter your first number"; num1 INPUT "Enter your second number"; num2 num3 = num1 * num2 CLS PRINT "The product of the two numbers is"; num3 END This example just has the user input 2 variables (num1 and num2) and store them as numerical variables. Num3 is defined by multiplying the two user-imputed variables. The text displayed with PRINT contains normal text with a semi colon to display the result. This is a string variable example: CLS INPUT "What is my name?"; name$ PRINT "Hi I'm"; name$ END Instead of inputting just the variable name, you add a dollar sign to signify that it's a string variable. String variables contain letters rather than numbers. For string variables, you simply put the $ after the variable name every time it's used. Other than that, it's much like a numerical variable. That's a basic outline of how the variables work. Manipulating the string variables is a different story.


C program to find the LCM of two numbers?

#include <stdio.h>int main(){ int num1, num2, max; printf("Enter two positive integers: "); scanf("%d %d", &num1, &num2); max=(num1>num2) ? num1 : num2; while(1) { if(max%num1==0 && max%num2==0) { printf("LCM of %d and %d is %d", num1, num2,max); break; } ++max; } return 0;}


In program c accept numbers num1 and num2 find the sum of all add numbers between the two numbers entered?

#include<stdio.h> main() { int num1; int num2; int a; printf("Enter any two numbers :"); scanf("%d%d",&num1,&num2); for(a=num1;num1<=num2;a++) { if ( a % 2 == 1); { printf("%d",a); } } getch(); }


Program to find greatest of two numbersin c?

if num1>num2 return num1 else return num2


Which is the code to multiply a number num1 by 2 using bitwise operator in c?

num1 <<= 1; /* shift left */


What is the function key to execute Qbasic program?

QBASIC operators are listed as follows.../along with some example QBASIC code... ->LOGICAL OPERATORS AND OR NOT EXAMPLE QBASIC CODE:- A=1 B=1 IF (A AND B) THEN PRINT "Result: True" ELSE PRINT "Result: False" ...output... Result: True A=1 B=2 IF (A AND B) THEN PRINT "Result: True" ELSE PRINT "Result: False" ...output... Result: False -> MATHEMATICAL OPERATORS + plus - minus * multiply / divide MOD division remainder ^ raise to the power EXAMPLE QBASIC CODE:- num1=4 num2=2 PRINT num1 + num2 PRINT num1 - num2 PRINT num1 * num2 PRINT num1 / num2 PRINT num1 MOD num2 PRINT num1 ^ num2 ...output... 6 2 8 2 0 16 -> COMPARISON OPERATORS = equals > greater than < lesser than >= greater than/or, equals <= lesser than/or, equals <> not EXAMPLE QBASIC CODE:- num1 = 6 num2 = 8 IF num1 = num2 THEN PRINT "Equal to" IF num1 > num2 THEN PRINT "Greater than" IF num1 < num2 THEN PRINT "Lesser than" IF num1 >= num2 THEN PRINT "Greater than/or, equal to" IF num1 <= num2 THEN PRINT "Lesser than/or, equal to" IF num1 <> num2 THEN PRINT "NOT equal" ...output... Lesser than Lesser than/or, equal to NOT equal