Answer:
// code in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables
int n;
cout<<"Enter a positive number:";
// read number
cin>>n;
// check number is positive or not
while(n<0)
{
// if number is negative
cout<<"Wrong input!!"<<endl;
// ask again to enter again
cout<<"Enter again:";
// read number again
cin>>n;
}
// generate random number between 1 to n
int ran=rand()%n +1;
// print random number
cout<<"Random number between 1 to "<<n<<" is: "<<ran<<endl;
return 0;
}
Explanation:
Read a number from user.Then if input number is negative then ask user to enter a positive number again.After this generate a random number between 1 to n.Print that random number.
Output:
Enter a positive number:-12
Wrong input!!
Enter again:9
Random number between 1 to 9 is: 2
Answer:
The Unsigned Integer
Explanation:
Solution
The data type i would ascribe to a pointer is the unsigned integer because it can be a pointer (int*number).
The unsigned Integer: they are like integers that is whole numbers, but have the property that they don't contain a + or - sign related with them. thus they are seen as non-negative (zero or positive).
Answer:
the first conputer brought in nepal was IBM 1401
3 would be self management