Question
Hi there! I need your help please to solve this question; This is my Try to solve this problem, Part (A) & (B) I wish
Hi there!
I need your help please to solve this question;
This is my Try to solve this problem, Part (A) & (B) I wish them Right
(I stopped in part B, I wanted it to display true/false instead of 1/0.
The last part (c) I went to Mars just looking for an explanation/answer!
I couldn't understand the whole problem so briefly.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace CheggQuest {
/*PROBLEM 03. Implement a class named Pronic with: * a method takes as input an integer and outputs the corresponding pronic number * at the place represented by that integer. * */
class Pronic { static void Main(string[] args) { Console.WriteLine("-----------------------------WELCOME---------------------------");
// Declare Section // int Z; int ZZ; int ZZZ; bool ZZZZ; // Input Section //
Console.Write("Please Enter a Pronic Integer : "); Z = Convert.ToInt32(Console.ReadLine());
//Output & Calucation Section // ZZ = InputOutputPronic(Z); TextCheckingPronic(); ZZZ=CheckingPronic(ZZ); ZZZZ = TrueFalsePronic(ZZ); Console.WriteLine(" The Entered Value status is : {0} ",ZZZ);
Console.WriteLine("-----------------------------Thank You---------------------------"); Console.WriteLine("-----------------Press Any Key To End The Program-----------------"); Console.ReadLine(); }
public static int InputOutputPronic(int Z) { //a method takes as input an integer and outputs the corresponding pronic number //at the place represented by that integer.
//Output & Calucation Section // Console.WriteLine("----------------------------------------------------------------"); Console.WriteLine("You have entered the value {0} to see if it Pronic or not", Z); Console.WriteLine("----------------------------------------------------------------"); return Z; }
public static void TextCheckingPronic() { Console.WriteLine(":::::::::::::::::: We're Checking For The Corresponding Pronic.. please wait :::::::::::::::::"); } public static int CheckingPronic(int Z) {
// Declare Section // int x; int y; int i;
//Output & Calucation Section // x = 0; y = 0;
for (i = 0; i
if (Z == y) return 1; else return 0; }
public static bool TrueFalsePronic(int Z) { //a method to check whether a given number is pronic or not. //Its output should be TRUE / FALSE. // Declare Section // bool T = true; bool F = false; //Output & Calucation Section // T = (Z == 1); F = (Z == 0);
if (T) return true; else return false; } } }
PROBLEM 3. (BA-ID#-PROBLEMO 3) Implement a class named Pronic with: [10+10+10 marks] A. a method takes as input an integer and outputs the corresponding pronic number at the place represented by that integer B. a method to check whether a given number is pronic or not. Its output should be TRUE/FALSE. C. a method takes as input a number. If it is pronic (use above method), it outputs the n and n+1 factors, otherwise it returns nothingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started