Bilginin Adresi Ana Sayfa
Forum Anasayfası Forum Anasayfası > Yaşama Dair > Eğitim Dünyası > Ödevler
  Aktif Konular Aktif Konular RSS - arkdaşlar c++ dan anlayan varsa bakabilirmi??
  SSS SSS  Forumu Ara   Events   Kayıt Ol Kayıt Ol  GiriÅŸ GiriÅŸ

arkdaşlar c++ dan anlayan varsa bakabilirmi??

 Yanıt Yaz Yanıt Yaz
Yazar
Mesaj
angelif Açılır Kutu Gör
Yeni Üye
Yeni Üye
Simge

Kayıt Tarihi: 09-03-2006
Konum: Turkiye
Status: Aktif DeÄŸil
Points: 0
Mesaj Seçenekleri Mesaj Seçenekleri   Thanks (0) Thanks(0)   Alıntı angelif Alıntı  Yanıt YazCevapla Mesajın Direkt Linki Konu: arkdaşlar c++ dan anlayan varsa bakabilirmi??
    Gönderim Zamanı: 18-04-2006 Saat 05:01

Homeworks must be delivered at the deadline date and hour.

  1. (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 <stdio.h>

#include <ctype.h>

#include <string.h>

 

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);

 

   

 

}

 

elfdlbz
Yukarı Dön
 Yanıt Yaz Yanıt Yaz

Forum Atla Forum İzinleri Açılır Kutu Gör



Bu Sayfa 0.195 Saniyede Yüklendi.