Rné-Ildi

Informatika órák segédanyagai

Órán írt programok

Köszönö program:

TextWindow.WriteLine("")
TextWindow.WriteLine("A program köszön!")
TextWindow.WriteLine("")
TextWindow.Write("Kérem adja meg a nevét: ")
a= TextWindow.Read()
TextWindow.WriteLine("")
TextWindow.WriteLine("Jó napot "+ a + "!")
TextWindow.WriteLine("")

 

Téglalap kerülete, területe:

TextWindow.WriteLine("")
TextWindow.WriteLine("A program a téglalap ter., ker. számolja ki!")
TextWindow.WriteLine("")
TextWindow.Write("Kérem adja meg az A oldalt: ")
a= TextWindow.ReadNumber()
TextWindow.WriteLine("")
TextWindow.Write("Kérem adja meg az B oldalt: ")
b= TextWindow.ReadNumber()
TextWindow.WriteLine("")
terület= (a*b)
kerület= 2*(a+b)
TextWindow.WriteLine("A téglalap területe: "+ terület+ " m2")
TextWindow.WriteLine("A téglalap kerülete: " + kerület+ " m")

 

Nemek

 

Dolgozat:

 Megoldások piros színnel!!!!!

 

https://drive.google.com/open?id=1AdcjFmu0BuILPFWe4RmVgQ-G63JInpoC

 

 7b órai anyag

1. feladat

TextWindow.WriteLine("")
TextWindow.WriteLine("A program bekér két számot és összeadja!") TextWindow.WriteLine("")
TextWindow.Write("Kérem adja meg az első számot: ")
a= TextWindow.ReadNumber()
TextWindow.WriteLine("")
TextWindow.Write("Kérem adja meg a második számot: ")
b= TextWindow.ReadNumber()
c= (a+b)
TextWindow.WriteLine("")
TextWindow.WriteLine("A két szám összege: "+ c )
TextWindow.WriteLine("")

2. feladat

TextWindow.WriteLine("")
TextWindow.WriteLine("A program kiírja a páros számokat 100-ig!")
TextWindow.WriteLine("")
For i=2 To 100 step 2
TextWindow.Write(" "+ i+" ")'Vízszintes kiírás
EndFor

 3. feladat

 

TextWindow.WriteLine("")
TextWindow.WriteLine("A program kiírja a nemeket!")
TextWindow.WriteLine("")
TextWindow.Write("Kérem adja meg az azonosítóját: ")
a= TextWindow.ReadNumber()
If (a=1) or (a=3) Then
TextWindow.WriteLine(" ÖN Férfi!")
ElseIf (a=2) or (a=4) then
TextWindow.WriteLine("Ön NŐ!")
ElseIf (a<=0)or (a>=5) then
TextWindow.WriteLine(" Ön rossz számot adott meg!")
EndIf

Négyzet terület, kerület

TextWindow.CursorLeft=10
TextWindow.CursorTop= 10
TextWindow.WriteLine("A program a bekért adat alapján kiszámítja a négyzet ker., ter.,!")
TextWindow.CursorLeft=20
TextWindow.CursorTop= 12
TextWindow.Write("Kérem adja meg az A oldalt: ")
a= TextWindow.ReadNumber()
t=(a*a)
k=(4*a)
TextWindow.CursorLeft=20
TextWindow.CursorTop= 14
TextWindow.WriteLine("A négyzet területe: " +t +" m2")
TextWindow.CursorLeft=20
TextWindow.CursorTop= 16
TextWindow.WriteLine("A négyzet kerülete: "+ k +" m")

sorozat 0-100 21-vel

TextWindow.WriteLine("")
TextWindow.WriteLine("A program 21-vel írja ki a sorozatott 1000-ig!")
For a=0 To 1000 Step 21
TextWindow.Write(" "+ a +" ")
EndFor
TextWindow.WriteLine("")

 

A kocka felszíne és térfogata

 

TextWindow.WriteLine("")
TextWindow.CursorLeft=16
TextWindow.CursorTop= 8
TextWindow.WriteLine("A program a bekért adatból kiszámítja a kocka felszínét és térfogatát!")
TextWindow.CursorLeft=16
TextWindow.CursorTop= 10
TextWindow.Write("Kérem adja meg az A oldalt: ")
a=TextWindow.ReadNumber()
f=6*(a*a)
v=(a*a*a)
TextWindow.CursorLeft=16
TextWindow.CursorTop= 12
TextWindow.WriteLine("A kocka felszíne:"+ f+ " m2")
TextWindow.CursorLeft=16
TextWindow.CursorTop= 14
TextWindow.WriteLine("A kocka térfogata: " + v+ " m3")

 

Életszakaszok

 

TextWindow.WriteLine("")
TextWindow.CursorLeft=16
TextWindow.CursorTop=8
TextWindow.Write("A program kiírja az életszakaszokat!")
TextWindow.CursorLeft=16
TextWindow.CursorTop=10
TextWindow.Write("Adja meg az életkorát: ")
a=TextWindow.ReadNumber()
TextWindow.CursorLeft=25
TextWindow.CursorTop=12
If (a=1) then
TextWindow.Write("Ön csecsemő!")
ElseIf (a>1)and (a<=3) then
TextWindow.Write(" Ön kisgyermek!")
ElseIf (a>3)and (a<=6) then
TextWindow.Write(" Ovis!")
ElseIf (a>6)and (a<=14) then
TextWindow.Write(" Általános iskolás!")
ElseIf (a>14)and (a<=18) then
TextWindow.Write(" Középiskolás!")
ElseIf (a>18)and (a<=23) then
TextWindow.Write(" Egyetemista!")
ElseIf (a>24) and (a<=117) then
TextWindow.Write(" Felnőtt!")
ElseIf (a<=0) then
TextWindow.Write(" Rossz számot adott meg!")
ElseIf (a>117) then
TextWindow.Write(" Az ember nem él eddig!")

EndIf
TextWindow.WriteLine("")





 

Weblap látogatottság számláló:

Mai: 2
Tegnapi: 11
Heti: 2
Havi: 34
Össz.: 42 231

Látogatottság növelés
Oldal: Small Basic
Rné-Ildi - © 2008 - 2024 - rne-ildi.hupont.hu

A HuPont.hu ingyen weblap készítő egyszerű. Weboldalak létrehozására: Ingyen weblap

ÁSZF | Adatvédelmi Nyilatkozat

X

A honlap készítés ára 78 500 helyett MOST 0 (nulla) Ft! Tovább »