letmexgulay
14/04/2006, 21:47
arkadaşlar bu kodun devamını yazmam gerekiyor.şoyle ki benden satır uzunlugunu isteyecek.diyelim ki 60 girdim.her satıra 60 karakter olana kadar yazdıracak aşagıdaki stringi. kelime bolunmeyecek ve bir satırdaki kelimeler arasındaki boşluklar hep aynı olacak.bu probleme benzer elinizde kod varsa gonderebilirmisiniz.yada bunu nasıl yapabilirim.bir fikir verebilirmisiniz?aklıma hiçbirşey gelmiyo ufak tefek birkaç şeyden öte...:garip: cok teşekkur ederim...
#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);
}
#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);
}