Homeworks must be delivered at the deadline date and hour.
(100 points)
Our second homework is about text justification. Justifying text can mean different things, but here we consider "justification on both sides", or "double justification", where text lines are justified both on the left and on the right. That is, all lines except (usually) the last one have equal width; the method used to achieve that is typically to leave extra space between words as needed. Such justification is very common in books and other printed matter and often regarded as an essential property of quality printing.
Rules :
1. Each line should start and end with an alphanumeric letter unless there is only one word in the line.
2. Each line length should be equal to the user specified length.
3. A word shouldn’t be broken into two parts.
4. The white space should be distributed in a balanced way.
Below you should find a starter code, with examples following. I want you to write a report which explains your solution and gives examples of your output. Also submit your code through moodle.
/* Homework assignment 2 */
/* Written by */
#include
#include
#include
void main() {
char sstr[] = " ModelSim provides an Integrated Debug Environment that facilitates efficient design debug for SoC and FPGA based designs. This GUI has continuously evolved to include new windows and support for new languages. This application note aims to give an introduction to the ModelSim 6.0 debug environment. This environment is trilingual supporting designs based on VHDL, Verilog (all standards including SystemVerilog, Verilog 2001 and Verilog 1995), and SystemC. Subsequent releases of ModelSim will enable even more debug capabilities supporting higher levels of abstractions for verification and modeling in SystemVerilog and SystemC. In ModelSim 6.0, the GUI has been enhanced and is based on Multiple Document Interface (MDI) layout standard. In addition, the debug windows have been re-organized in such a way as to display design data and simulation results in an intuitive manner.";
int twid;
int slen = 0;
slen = strlen(sstr); // Length of the input string
//printf("\nlen :%d\n", slen);
printf("Enter text width :");
scanf("%d",&twid);
//printf("\nText Width %d",twid);
}
arkdaşlar c++ dan anlayan varsa bakabilirmi??
ödev ihtiyaçlarınızı burada paylaşabilirsiniz
-
angelif
- Mesajlar: 0
- Kayıt: Sal Şub 24, 2026 11:29 am
- İletişim:
Geçiş yap
- Off-Topic
- ↳ Genel
- ↳ Geyik Muhabbet Ve Komedi
- ↳ Fıkralar
- ↳ Resimler & Arkaplanlar
- ↳ Video & Flash Dosyaları
- ↳ Anket
- ↳ Telefon &Tablet
- ↳ Symbian Telefonlar
- ↳ Gsm Oyunları
- ↳ Gsm Programları
- Yaşama Dair
- ↳ Elektronik Kitap & E-Book
- ↳ Edebiyat (Şiir)
- ↳ Sağlık
- ↳ Sinema
- ↳ Dvix-Film
- ↳ Online Sinema
- ↳ E-MULE
- ↳ Yabancı Diziler
- ↳ Yemek Tarifleri
- ↳ Eğitim Dünyası
- ↳ Ödevler
- ↳ Mühendisler dünyası
- ↳ Üniversiteler & Kampüsler
- ↳ İngilizce
- ↳ Genel Kültür
- ↳ Felsefe ve Psikoloji
- ↳ Öğretmenler ve Adaylar
- ↳ İlköğretim ve Lise
- Müzik Dünyası
- ↳ Müzik Genel
- ↳ Şarkı sözleri istek
- ↳ Enstrümanlar
- ↳ Müzik Yardım
- ↳ Konser Organizasyon
- ↳ Video Klipler
- ↳ Yerli Klipler
- ↳ Yabancı Klipler
- ↳ Pop
- ↳ Diğer Müzik Türleri
- ↳ Rock ve Metal
- ↳ Rap ve Hipop
- ↳ Techno ve Trance
- ↳ Arabesk ve Fantazi
- ↳ Latin Dansları
- ↳ Salsa
- ↳ Bachata
- Haberler
- ↳ Güncel
- ↳ Bilim ve Teknoloji
- ↳ Magazin Haberleri
- Spor
- ↳ Futbol Genel
- ↳ Fenerbahçe & Galatasaray
- ↳ Trabzonspor & Beşiktaş
- ↳ Bahis & İddaa
- ↳ Basketbol
- ↳ Diğer Branşlar
- ↳ Av,Avcılık ve Silahlar
- Bilgisayar Güvenliği / Computer Security
- ↳ Bilgisayar Güvenliği
- ↳ Dosyalar
- ↳ Güvenlik / Security Haberleri
- ↳ Güvenlik / Security Makaleleri
- ↳ Exe & DLL Arşivi
- ↳ Zarar veren Yazılımları temizleme
- ↳ Beyaz şapka
- ↳ Güvenlik Programları, Güvenlik ve Güvenlik açıkları
- Bilgisayar
- ↳ Windows İşletim Sistemleri
- ↳ Programlar
- ↳ AIO Programlar
- ↳ Portable Programlar
- ↳ Yazılı ve Görsel Program Anlatımları
- ↳ Chat & Msn Programları
- ↳ Skype Genel
- ↳ MSN Genel Bölüm
- ↳ Avatar & Smiley
- ↳ MIRC Genel
- ↳ İkinci el ve 0 Parçalar
- ↳ VoIP
- ↳ Pardus / Linux İşletim Sistemleri
- Donanım & Hardware
- ↳ Donanım
- ↳ Driver & Firmware
- ↳ Network
- Webmaster
- ↳ Webmaster Genel
- ↳ Site Tanıtım
- ↳ Web Hosting
- Oyun
- ↳ Oyun Download
- ↳ Oyun yamaları
- ↳ Oyun Hileleri
- ↳ Oyun Muhabbetleri ve Yardımları
- ↳ Online Oyunlar
- ↳ Travian Online
- ↳ Knight Online
- ↳ Silkroad Online
- ↳ Konsollar Ve Emulatörleri
- Forum
- ↳ Forumlarla İlgili Duyurular/Sorularınız/Sorunlarınız
- ↳ Silinen Konular
Kimler çevrimiçi
Bu forumu görüntüleyen kullanıcılar: Hiç bir kayıtlı kullanıcı yok ve 1 misafir