Question

In C# Programming Language create an application of your choice that would use at least one...

In C# Programming Language create an application of your choice that would use at least one do…while iteration, and…For loop.

Make sure to have a modular solution (= include multiple methods)

Submit via forum your analysis and design document, .cs file, and a screenshot of the solution.

Include a short explanation of your choice of the selections.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Code---

using System.IO;
using System;

class Program
{
static int Fibonacci(int n){ //calculate nth fibonaccci number
int a=0,b=1,c=1,i=2;
do{
c=a+b;
a=b;
b=c;
i++;
} while(i<=n);
return c;
}
  
static void AllFibonacci(int n){ //print all fibnacci number till n
int i=1;
while(i<=n){
Console.WriteLine("Fibonacci "+i+": "+Fibonacci(i));
i++;
}
}
static void PrintStar(int n){ //print * pattern
for(int i=1;i<=n;i++){
for(int j=1;j<=i;j++){
Console.Write("*");
}
Console.WriteLine("");
  
}
}
  
static void Main(){
Console.WriteLine("Starting program!");
AllFibonacci(10);
Console.WriteLine("\n\n");
PrintStar(10);
  
Console.WriteLine("Ending program!");
  
}
}

Add a comment
Know the answer?
Add Answer to:
In C# Programming Language create an application of your choice that would use at least one...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please use python Programming Language: Select one of the following topics: Band Character Account Create a...

    Please use python Programming Language: Select one of the following topics: Band Character Account Create a class based on your chosen topic. Make sure to include at least four attributes of varying types, a constructor, getters/setters for each attribute w/input validation, a toString, a static attribute, and a static method. Then, create a function (outside of your class) that connects to a text file which should contain the attributes of several objects. Read the data from the file, use the...

  • C# programming Create an application that prompts the user for a storm windspeed in mph, then...

    C# programming Create an application that prompts the user for a storm windspeed in mph, then determines the correct typhoon category. The program must run all test cases of storm windspeed in one execution. Use a sentinel value to terminate the program. Do not assume a specific number of inputs. Determine the maximum storm windspeed value input. Note that the maximum must be evaluated within your program. You MAY NOT use C built in function. Output screenshot must include the...

  • Understand the Application For this lab you will create a basic application programming interface (API) for...

    Understand the Application For this lab you will create a basic application programming interface (API) for spawning multiple threads in a program using Python3's threading module. The Program Spec Write a program that creates a minimum of two threads with different target functions. Each thread will perform the work of each function. Each function will compute a task (described below) and print out a result. Implementation Details Write a program that creates a minimum of two threads using Python's threading...

  • programming language is C++. Please also provide an explanation of how to create a file with...

    programming language is C++. Please also provide an explanation of how to create a file with the given information and how to use that file in the program Let's consider a file with the following student information: John Smith 99.0 Sarah Johnson 85.0 Jim Robinson 70.0 Mary Anderson 100.0 Michael Jackson 92.0 Each line in the file contains the first name, last name, and test score of a student. Write a program that prompts the user for the file name...

  • COP 2660, Programming for Mobile Devices Using Android Studio Create the working application as You can...

    COP 2660, Programming for Mobile Devices Using Android Studio Create the working application as You can design a different listView of your choice. Try to have at-least 3 items in your listView. Zip your project file link and upload the code Purpose: is designed to assess the implementation of ListView activities.

  • Application should be in C# programming language Create a class called SavingsAccount.  ...

    Application should be in C# programming language Create a class called SavingsAccount.  Use a static variable called annualInterestRate to store the annual interest rate for all account holders.  Each object of the class contains a private instance variable savingsBalance, indicating the amount the saver currently has on deposit. Provide method CalculateMonthlyInterest to calculate the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12 – this interest should be added to savingsBalance.  Provide static method setAnnualInterestRate to set the...

  • Submissions are accepted in program codes in C PROGRAMMING LANGUAGES COURSE ASSIGNMENT Design your own general purpose programming language which will be completely in english Your language design...

    Submissions are accepted in program codes in C PROGRAMMING LANGUAGES COURSE ASSIGNMENT Design your own general purpose programming language which will be completely in english Your language design must include the following A general skeleton of a program State diagrams for the following (35 pts) . Identifier Unsigned integer Unsigned constant Constant Variable Factor and term rules similar to the ones given in your textbook Simple expression Compound expression . Parameter list Simple type 1D Array type Statement Block Loop...

  • Java is an object-oriented programming language that enables us to define classes and to instantiate them...

    Java is an object-oriented programming language that enables us to define classes and to instantiate them into objects. These objects then call each other’s methods to implement the behavior of the application. The Unified Modeling Language (UML) is an object-oriented visual notation to document the design of object-oriented classes. For this discussion, you will practice designing a Java class called Course, drawing a UML class diagram for the Course class, and then implementing the Course class in Java code. Review...

  • C# Programming : Create a housing application for a property manager. Include a base class named...

    C# Programming : Create a housing application for a property manager. Include a base class named Housing. Include data characteristics such as address and year built. Include a virtual method that returns the total projected rental amount. Define an interface named IUnits that has a method that returns the number of units. The MultiUnit class should implement this interface. Create subclasses for MultiUnit and SingleFamily. SingleFamily should include characteristics such as size in square feet and availability of garage. MultiUnit...

  • Write a java application that is including a three-question multiple choice quiz about Java programming language....

    Write a java application that is including a three-question multiple choice quiz about Java programming language. Each question must have four possible answers (numbered 1 to 4). Also, ask user to type 0 to exit the test. [Assume that a user enters only integers 1,2,3,4, or 0]. Firstly, display a message that this quiz includes three questions about the Java programming language and display that each question has four possible answers. If the answer is correct for the given question,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT