ChatCrawlersearch across public Telegram Open the app
W

Web Development Bootcamp

сообщение · 2022-07-18 16:07 UTC
W
Web Development Bootcamp
[1,2,3 ] loop chalaya 3 nikaala ,,, usko 3 * 10^0 = 3 fir 2 * 10^1= 20 fir 1 * 10^2= 100 Now Add them 100 + 20 + 3 Add sath sath karte raho ek Sum variable banakar... for loop ka i =2 hoga toh ab 10 ki power 0 laani hai ... toh you will do like length - i-1 length = 3 mtlb i=2—> 3-2-1 = 0 fir i =1-» 3-1-1 =1 fir i=0—» 3-0-1 = 2 toh iss trha se 10 ki power banegii... Loop from right to left ————————————— 1,3,4,2 hai sum = 0; for( i = 3 to 0) sum += a[i] * pow(10,len - i -1); DRY RUN —-»» len =4 , sum = 0 i =3--» sum = 0 + 2* pow(10,4-3-1)-»2 i =2--» sum = 2 + 4* pow(10,4-2-1)-» 42 i =1--» sum = 42 + 3* pow(10,4-1-1)-» 342 i =0--» sum = 342 + 1* pow(10,4-0-1)-» 1342 I hope samjh jaoge ... Chaho toh iss array ko string me daalo or string ko Integer banado ..JavaScript Python me esa karna easy hai ....

All messages on 18 July 2022 · Whole feed · оригинал в Telegram

Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog