VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 4635 ClientLeft = 4200 ClientTop = 3300 ClientWidth = 7275 LinkTopic = "Form1" ScaleHeight = 4635 ScaleWidth = 7275 End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim mfilesysobj As New FileSystemObject Dim sys2 As New FileSystemObject Dim mfile, mfile2 As File Dim mtxtsrteam, mtxt2 As TextStream Dim a, b, c, d As String Dim i, j As Integer Private Sub Form_Load() l = MsgBox("az bodan file c:\in.txt motmen beshavid", vbOKCancel, "alireza amirkhani-555385240") If l <> 1 Then End End If l = MsgBox("file out.txt pak mishavd", vbOKCancel + vbCritical, "alireza amirkhani-555385240") If l <> 1 Then End End If Set mfile = mfilesysobj.GetFile("c:\in.txt") Set mtxtsrteam = mfile.OpenAsTextStream(ForReading) Call sys2.CreateTextFile("c:\out.txt") Set mfile2 = sys2.GetFile("c:\out.txt") Set mtxt2 = mfile2.OpenAsTextStream(ForWriting) a = mtxtsrteam.ReadLine b = mtxtsrteam.ReadLine shomare = 1 Do While (Asc(Mid$(a, shomare, 1)) <> 32) c = c + (Mid$(a, shomare, 1)) shomare = shomare + 1 Loop j = Len(c) a = Mid$(a, j + 1) shomare = 1 Do While (Asc(Mid$(a, shomare, 1)) = 32) d = d + (Mid$(a, shomare, 1)) shomare = shomare + 1 Loop j = Len(d) a = Mid$(a, j + 1) i = StrReverse(b) e = Val(a) + Val(c) mtxt2.Write (e) mtxt2.WriteLine ("") mtxt2.Write (i) exiting = MsgBox("barname ba moafagiat payan yaft ", vbOKOnly + vbInformation, "ali reza amirkhani,555385240") End End Sub