ENED 1091 Study Guide - Quiz Guide: C String Handling, Matlab, Decimal Mark

37 views4 pages
4 May 2017
School
Course
Professor

Document Summary

% prompt the user to enter a number and store the number under the variable name, x, as a double x = input("enter a number please: "); % prompt the user to enter text and store the number under the variable name, month, as a string month = input("enter the month that you were born: ","s"); % if the user clicks on the yes button, then the variable choice = 1. % if the user clicks on the no button, then the variable choice = 2. % decimal numbers x = 75. 176; fprintf("the variable x = %0. 2f \n",x); % %0. 2f means show two places behind decimal point. % integers y = 750; fprintf("the value of y is: %i \n",y); % strings course = "models ii"; fprintf("the name of this course is: %s \n",course); The name of this course is: models ii.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers

Related Documents