Computer problems,Computer help
*AX SOFT>>>Programming & Design

While statement?


Write a program to identify the smallest negative number and largest positive number that can be store in a variable
of data type 鈥渟hort int鈥? Your program MUST use while statement (and break if necessary) only for looping.

c language
declaration of short int variable

#include <iostream.h>
int main() {
short int x;
cout <<(x)<<endl; //Most compilers automatically assume the variable is the large possible number unless defined. but the below code is if yours does not.
x=0;
do {
cout <<(x++)<<endl;
}while(x <32654)
}
its been a pleasure doing your homework for you.

You should give some more information about which programming language you are asking about. I assume its c based, but that information could definitely change the answer here...

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • How do you make a myspace or website backround?

    Thats simple. All you have to do is go to hotfreelayouts.com and look over all of the different backgrounds that are availible. When you find the one that you want, copy the code and paste it at th...

  • [C#] How do I get the name of the current program's namespace as a string?

    Hello, Okay, now the question is a understandable. :) You have to recall that an application may or may not have an namespace, it is optional, but it is best to use it for organization and many ...

  • How do you "reinstall" Zwinky?

    i would leave zwinky alone i think it has spyware and all sorts of crap that you dont want

    ...
  • Shall I take C#/C++ or Visual Basic for AVR Programming?

    well since you do assembly then learning any other of the said languages will be easy for you, given your situation I'd say go for C/C++!

    ...
  • Java, nested loop?

    for (int c=1;c<=4;c++) { for (int i=c;i<=4;i++) { System.out.println(i); } }

    ...
  • I need help to create a program to put a string backwards with an array and a function?

    Not sure what language, but in pseudo code.... I assume you have an array that contains Strings. 1) Loop through the array creating a temporary string variable for each word in your array. &...

  • Vista slow boot with black screen?

    mines does the same. nothing wrong with that at least it doesn't have some Major virus!

    ...
  • Is there a visual basic for Mac? Or something Similar?

    i like java. the syntax is similar to visual basic in most respects, and it works on all computers not just ms windows. eclipse is an awesome development platform for java and works great on os...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster