Первая задача. Язык СИ

Всем привет. Хочу по возможности выкладывать решенные мною задачи на языке программирования СИ. Задачи для школьников. Буду пытаться их решить. 🙂 Вообще потихоньку так хочу развивать свою логику, хоть и поздно я начал, но все же попробую. 🙂

1. Задание на простейшие циклы

1) Задано натуральное число N. Составить программу вычисления суммы цифр числа.





int N, i, sum=0; /* Объявляем целочисленные переменные*/

scanf(«%d», &N); /* Вводим число с клавиатуры*/

printf(«N=%d», N); /*Выводим на монитор введенное число*/

for (i=0; i<N; i++) /* Происходит цикл, в котором переменной sum присваиваем числа, от нуля до N*/


printf («\nSum=%d\n», sum); /*Выводим на монитор полученную сумму*/

getch(); /*Функция, чтобы при завершении программы результаты оставались на экране*/

return 0; /*Эта строка говорит о том, что программа завершилась корректна*/


Язык СИ, наверно самый популярный язык во всем мире, на базе его синтаксиса построены другие новые языки. Подробнее о Си можете почитать на Википедии.

Комментариев нет »

  1. п»їDear Fighter Pilots,

    How to Win Baccarat: !!! 100% Deposit Match up to $300 !!!
    Play 30+ FREE 3-reel and 5-reel slots: Mountain Fox, Treasures of Egypt, Flaming Crates, Prosperous Fortune, Magic Wheel, Fruit Smoothie, Party Bonus, Video Poker and more! https://rebrand.ly/kuxdd slot machines for sale uk slot nigeria ltd official website slots of vegas promo codes slots lv online casino free casino slots real money click this over here now Some appearing ability, slots of, we always remember you possibly can be some online for casino slots on-line free video games. https://bit.ly/3ghiyIJ They also usually have their own exclusive section in the casino where you can play.
    ВЎDisfruta de las mejores tragamonedas y vive toda la emociГіn de las mГЎquinas recreativas online! visit the site New free slot machines Vegas-style online casino games are added weekly. have a peek at these guys Jackpot Slots PartyCasino is home to an exciting range of jackpot slots that have the potential to pay out prizes in excess of ВЈ2 million in a single spin. Online 8/7/В  Loosest Slot Machines: When you hear other players talk about “tight” and “loose” slot machines, they are talking about the payout percentage. my review here Slots:Free Slot Machine Games,Casino Slots Machines Free,Casino Slots Free,Casino Games For Kindle Fire,Best Casino Games For Free,Play Las Vegas Casino Slots,Your Lucky Slots Dec 17, out of 5 stars The Starburst slot is often the one slot game that many mobile casino sites will attach their free spins offers and promotions to, and as such that particular slot does get a lot of attention from players, mainly those that have been awarded with a free set of spins for signing up to an app or mobile casino site! Over 7, FREE Online Slots Games to play () — Play free slot machines from the top providers.
    ALL Free Spins and No Deposit Bonuses are available to New Players ONLY. https://rebrand.ly/0jp0u Punch Hole: L32 x W x H 9 mm Punching Capacity: mm cardboard or mm soft PVC or mm hard PVC Adjustable Punching Margin: 10 ~ mm. https://cutt.us/na8zb jackpot party casino slots bonus collector slots games with bonus slots queen of the nile casino slots win real cash slot tracks for sale https://gamesforrealmoney.blogspot.com

    Comment by Robertweina — 13 Декабрь 2020 @ 03:26

  2. Hi Friends,

    Jackpot Party Casino !!! 100% Deposit Match up to $300 !!!
    While they are also known asVirtual casinos andInternet casinos, the termOnline casino has become the front running term to describe this type of online gambling. https://rebrand.ly/3nx78 slot online gratis senza scaricare slot machine bot discord casino slots games online slot machine wins this week casino slots play free More Bonuses Large casino providers also love the Vegas vibes. https://bit.ly/3mOS0RK Simply scroll through our list until you find the bonus .
    After getting you started on the right foot with the deposit bonus you can get started on our favorite casino games. i loved this Play 30+ FREE 3reel and 5reel slots: Mountain Fox, Treasures of Egypt, Flaming Crates, Prosperous Fortune, Magic Wheel, Fruit Smoothie, Party Bonus, Video Poker and more! FREE Online Slot . learn this here now There isn’t a dull moment here. 20 hot blast real money Einzahlung – Match Bonus bis zu € Mindesteinzahlung 10 € Umsatzbedingungen für diesen Bonus betragen 20 x des Bonusgeldes und der Einzahlung und 30x der Gewinne aus Freispielen, bevor eine Auszahlung beantragt werden kann, was für ein Online Casino als sehr guter Durchschnitt angesehen werden kann. read Even better, new players will be rewarded with free coins and there’s bonuses you can collect every day that you play. such Now this is why our site can be a helpful resource and a very effective Slotomania free coins bonus collector system.
    Welcome to the Slot Tech Forum. additional reading Today’s casino slots are a far cry from the old classic physical Vegasstyle machines. https://rebrand.ly/vvy46 Quick Hit Slots Machine. https://cutt.us/uDpdY slots era level 44 slot hole punch for id cards free slots games vegas biggest slot wins ever casino slot machine game https://gamesforrealmoney.blogspot.com

    Comment by Robertweina — 19 Декабрь 2020 @ 16:39

RSS-лента комментариев к этой записи. TrackBack URL

Оставить комментарий