did you put the port number ???
i mean after telnet server port number
try using :
telnet google.com 80
deviantrunner 0 Newbie Poster
hello i just to know how to define an array...
when using a variable...
for example...
cin >> numb;
int an_array[numb]
when i try it...it tells me
cannot allocate an array of constant size 0
and
unknown size
...
so could you please tell me how do it ???
deviantrunner 0 Newbie Poster
well hope this helps...i ddnt check the other guys...just wanted 2 do smting cuz i was bored...if u find something wrong tell me...thnx... xD
#include <iostream.h>
int nb_of_year;
int i,j,n;
double r_inches;//rainfall inches
int totalm=0;//total months
double total_i;//total inches
double averagei;
int main()
{
cout << "enter the number of years u wanna do the calculations for :\n";
cin >> n;
for (i=1;i<=n;i++)
{
for (j=1;j<=12;j++)
{
cout << "Enter the rainfall (in inches) for month "<< j << " of year ";
cout << i << ":\n";
cin >> r_inches;
total_i+=r_inches;
totalm+=1;
}
}
cout << "The total number of months of rainfall data :" << totalm << endl;
cout << "The total inches of rainfall for that period:" << total_i << endl;
averagei=total_i/totalm;
cout << "The average rainfall per month for that period is:" << averagei <<endl;
return 0;
}
deviantrunner 0 Newbie Poster
ok man...i found some mistakes too =P!!!
we have defined the division by mul XD!!!so i found out about it when i was testing it XD!!!
i just thought i should post it anyway...
and i added some few stuff in the division section...
thanks a lot for your help...i can see how stupid i am XD!!!
print"Simple Calculator"
def menu():
print"-------------------------------------------------"
print"the option menu"
print"1)add"
print"2)substract"
print"3)multiply"
print"4)divide"
print"5)exit"
print"-------------------------------------------------"
return input("please choose the number of the task u want =) ")
def add(a,b):
print"u have chosen 2 add two numbers"
print a,"+",b,"=",a+b
def sub(a,b):
print"u have chosen 2 substract two numbers"
print a,"-",b,"=",a-b
def mul(a,b):
print"u have chosen 2 multiply two numbers"
print a,"x",b,"=",a*b
def div(a,b):
print"u have decided 2 divde two numbers"
print a,"/",b,"=",a/b
print"the rest of the division of",a,"by",b,"is",a%b
loop=1
choice=0
while loop==1:
choice=menu()
if choice==1:
print add(input("1st number u wanna add :"),input("2nd one :"))
elif choice==2:
print sub(input("1st number u wanna substract :"),input("2nd one :"))
elif choice==3:
print mul(input("1st number u wanna multiply :"),input("2nd one :"))
elif choice==4:
print div(input("1st number u wanna divide :"),input("2nd one :"))
elif choice==5:
loop=0
else:
print"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
print"type in the correct number...Between 0 and 6!"
print"thank u 4 using this calculator XD"
print"come again soon =)"
deviantrunner 0 Newbie Poster
i'm pretty new to using python...i'm still in the 1st basics...
nyway i've tried to work this up...
but it didn't work :s...
it shows that there's something wrong with the "def" of the add and sub and div and mul formulas...here is the program...
tell me what i did wrong please!!!
print"Simple Calculator"
def menu():
print"-------------------------------------------------"
print"the option menu"
print"1)add"
print"2)substract"
print"3)multiply"
print"4)divide"
print"5)exit"
print"-------------------------------------------------"
return input("please choose the number of the task u want =)"
def add(a,b):
print"u have chosen 2 add two numbers"
print a,"+",b,"=",a+b
def sub(a,b):
print"u have chosen 2 substract two numbers"
print a,"-",b,"=",a-b
def mul(a,b):
print"u have chosen 2 multiply two numbers"
print a,"x",b,"=",a*b
def div(a,b)
print"u have decided 2 divde two numbers"
print a,"/",b,"=",a/b
loop=1
choice=0
while loop==1:
choice=menu()
if choice==1:
print add(input("1st number u wanna add"),input("2nd one")
elif choice==2:
print sub(input("1st number u wanna substract"),input("2nd one")
elif choice==3
print mul(input("1st number u wanna multiply"),input("2nd one")
elif choice==4
print mul(input("1st number u wanna divide"),input("2nd one")
elif choice==5
loop=0
else:
print"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
print"type in the correct number...Between 0 and 6!"
print"thank u 4 using this calculator XD"
print"come again soon =)"
deviantrunner 0 Newbie Poster
hi...
here's the deal!!!
i've contacted the company for the information abt my router's user and admin...
but they didin't give it to me...and i've tried the default pass and username...they ddnt work...
i'm doing this because i want 2 forward my ports...
i told them to open the ports the ports for me...but i'm sure they didn't do that...
so is there a way to find out the user and pass???like a brute-force or some sord of program???
i'm lookin not to reset the router...because last time i did that,i lost the internet connection.
and if there's no other way but to do that...can u give me a link or something on how to setup the router's settings 2 make the connection work again?and is there a way to open the ports without going into the router's settings???
please help me!!!i wanted to forward my ports five months ago...and i just found out about this amzing website :) that helped me with some great stuff...
Please...Help!!!!